diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5a8f15..7ac63c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3.9 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.2.3 + rev: v4.6.0 hooks: - id: check-merge-conflict - id: check-added-large-files @@ -15,12 +15,12 @@ repos: - id: pretty-format-json args: ["--autofix", "--allow-missing-credentials"] - repo: https://github.com/PyCQA/isort - rev: 5.6.4 + rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] - - repo: https://gitlab.com/pycqa/flake8 - rev: "8f9b4931b9a28896fb43edccb23016a7540f5b82" + - repo: https://github.com/PyCQA/flake8 + rev: "7.0.0" hooks: - id: flake8 additional_dependencies: [flake8-print] @@ -28,14 +28,14 @@ repos: args: - --select=F401,F403,F406,F821,T001,T003 - repo: https://github.com/humitos/mirrors-autoflake - rev: v1.3 + rev: v1.1 hooks: - id: autoflake files: '\.py$' exclude: '^\..*' args: ["--in-place", "--remove-all-unused-imports"] - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 24.4.2 hooks: - id: black args: ["--target-version", "py38"] diff --git a/Parser/interface.py b/Parser/interface.py index 09f95e8..bc4a0c8 100644 --- a/Parser/interface.py +++ b/Parser/interface.py @@ -57,7 +57,10 @@ def json_error(request_id, code, message=None): return { "json_prc": JSON_PRC.version_string, "id": request_id, - "error": {"code": code, "message": str(e),}, + "error": { + "code": code, + "message": str(e), + }, } diff --git a/tests/test_parse.py b/tests/test_parse.py index 993d393..6230552 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -13,7 +13,13 @@ def setUp(self): "json": "2.0", "id": 42, "method": "foo_bazBaz", - "params": [13, {"xyzzy": 666, "inky": ["pinky", "blinky", "clyde"],},], + "params": [ + 13, + { + "xyzzy": 666, + "inky": ["pinky", "blinky", "clyde"], + }, + ], } def test_from_dict(self):