From 3a0bed8c4ed8a430821d71e5e12481afcf44a6d7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:24:25 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/psf/black: 23.12.1 → 25.1.0](https://github.com/psf/black/compare/23.12.1...25.1.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.2.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.2.0) - [github.com/pycqa/isort: 5.13.2 → 6.0.1](https://github.com/pycqa/isort/compare/5.13.2...6.0.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From 418b2c1f27731708ef7e6ab7ec584ca196fd5584 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:24:34 +0000 Subject: [PATCH 2/2] ci: correct from checks. --- cbmc/__init__.py | 1 + tests/test_api.py | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) 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