diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e097b13..8702a74 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -29,7 +29,7 @@ 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 @@ -37,7 +37,7 @@ repos: 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 @@ -45,7 +45,7 @@ repos: 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 diff --git a/cbmc/__init__.py b/cbmc/__init__.py index ba0232c..c09b1ee 100644 --- a/cbmc/__init__.py +++ b/cbmc/__init__.py @@ -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 diff --git a/tests/test_api.py b/tests/test_api.py index fcbe8a4..c67cb2e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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 @@ -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