From f75d2857ad42e3b0a1d69a1a588b4622343c4552 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:14:33 +0000 Subject: [PATCH 1/2] chore(pre-commit.ci): pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/commitizen-tools/commitizen: v4.16.5 → v4.19.0](https://github.com/commitizen-tools/commitizen/compare/v4.16.5...v4.19.0) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/tox-dev/pyproject-fmt: v2.25.3 → v2.29.4](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.3...v2.29.4) - [github.com/python-poetry/poetry: 2.4.1 → 2.5.1](https://github.com/python-poetry/poetry/compare/2.4.1...2.5.1) - [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.16.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.10...v0.16.9) - [github.com/pre-commit/mirrors-mypy: v1.20.2 → v2.3.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.20.2...v2.3.1) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 66ef2e2..287df15 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,12 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v4.16.5 + rev: v4.19.0 hooks: - id: commitizen stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: debug-statements - id: check-builtin-literals @@ -28,11 +28,11 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/tox-dev/pyproject-fmt - rev: "v2.25.3" + rev: "v2.29.4" hooks: - id: pyproject-fmt - repo: https://github.com/python-poetry/poetry - rev: 2.4.1 + rev: 2.5.1 hooks: - id: poetry-check - repo: https://github.com/pre-commit/mirrors-prettier @@ -41,7 +41,7 @@ repos: - id: prettier args: ["--tab-width", "2"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.10 + rev: v0.16.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes] @@ -52,7 +52,7 @@ repos: - id: codespell args: [-L, astroid] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.20.2 + rev: v2.3.1 hooks: - id: mypy additional_dependencies: [types-pyyaml, strenum] From 138e57f8bf084606703ecb6ca68d5a1cd45ab88b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:14:47 +0000 Subject: [PATCH 2/2] chore(pre-commit.ci): auto fixes --- README.md | 6 +++++- src/account_codes_jp/_blue_return.py | 2 +- tests/test_dunder_main.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 185bbf7..7be502e 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,11 @@ $ account-codes-jp list --type blue-return ``` ```python -from account_codes_jp import get_blue_return_accounts, get_account_type_factory, AccountType +from account_codes_jp import ( + get_blue_return_accounts, + get_account_type_factory, + AccountType, +) G = get_blue_return_accounts() t = get_account_type_factory(G) diff --git a/src/account_codes_jp/_blue_return.py b/src/account_codes_jp/_blue_return.py index 2d977eb..1724791 100644 --- a/src/account_codes_jp/_blue_return.py +++ b/src/account_codes_jp/_blue_return.py @@ -38,7 +38,7 @@ def from_nested_dict( if isinstance(grandchildren, Mapping): q.append((id_child, grandchildren)) elif isinstance(grandchildren, list): - q.append((id_child, {k: None for k in grandchildren})) + q.append((id_child, dict.fromkeys(grandchildren))) return G diff --git a/tests/test_dunder_main.py b/tests/test_dunder_main.py index 843c490..1979168 100644 --- a/tests/test_dunder_main.py +++ b/tests/test_dunder_main.py @@ -4,7 +4,7 @@ def test_can_run_as_python_module(): """Run the CLI as a Python module.""" - result = subprocess.run( # noqa: S603 + result = subprocess.run( [sys.executable, "-m", "account_codes_jp", "--help"], check=True, capture_output=True,