Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

[pre-commit.ci] pre-commit autoupdate #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: requirements-txt-fixer
name: Requirements
Expand Down Expand Up @@ -29,23 +29,23 @@ repos:
- id: check-merge-conflict
name: Merge Conflicts
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 25.1.0
hooks:
- id: black
name: Black Formatting
language: python
types: [file, python]
args: [--line-length=100]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.2.0
hooks:
- id: flake8
name: flake8 Formatting
language: python
types: [file, python]
args: [--max-line-length=100, --ignore=E203 E301 E302 E501 E402 E704 W503 W504]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
name: isort Formatting
Expand Down
1 change: 1 addition & 0 deletions cbmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Copyright (c) 2023 ItsRqtl
Licensed under the MIT License. See LICENSE for more details.
"""

from .api import * # noqa: F403, F401
from .exception import * # noqa: F403, F401
from .post import * # noqa: F403, F401
20 changes: 16 additions & 4 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,14 @@ def test_sync_get_posts() -> None:
assert posts[0].post_id == 1703
assert posts[0].platform_id == 2067
assert posts[0].type == "靠北麥塊"
assert posts[0].content == "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
assert posts[0].__str__() == "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
assert (
posts[0].content
== "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
)
assert (
posts[0].__str__()
== "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
)
assert posts[0].photo is None
assert posts[0].admin_post is False
assert posts[0].approve_timestamp == 1682317224
Expand Down Expand Up @@ -352,8 +358,14 @@ async def test_async_get_posts() -> None:
assert posts[0].post_id == 1703
assert posts[0].platform_id == 2067
assert posts[0].type == "靠北麥塊"
assert posts[0].content == "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
assert posts[0].__str__() == "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
assert (
posts[0].content
== "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
)
assert (
posts[0].__str__()
== "確定某瑞只有跑去開GTA嗎?\r\n\r\n搞不好換了個名字 繼續開騙錢服 準備再次惡意倒閉呢\r\n\r\n呵呵呵~~"
)
assert posts[0].photo is None
assert posts[0].admin_post is False
assert posts[0].approve_timestamp == 1682317224
Expand Down