Skip to content
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -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]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/account_codes_jp/_blue_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion tests/test_dunder_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading