diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c0c53193..7f1a607a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-yaml - id: detect-private-key @@ -24,34 +24,34 @@ repos: - --markdown-linebreak-ext=md - repo: https://github.com/MarcoGorelli/auto-walrus - rev: v0.2.2 + rev: 0.3.4 hooks: - id: auto-walrus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.2 + rev: v0.8.0 hooks: - id: ruff # See pyproject.toml for args # args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.10.0 hooks: - id: black # See pyproject.toml for args - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell # See pyproject.toml for args additional_dependencies: - tomli - repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 + rev: v2.5.0 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.16 + rev: v0.23 hooks: - id: validate-pyproject diff --git a/pyproject.toml b/pyproject.toml index cc92b322..a8b08bcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,28 @@ [tool.ruff] +target-version = "py37" + +line-length = 616 select = [ - "C4", # flake8-comprehensions - "C90", # mccabe - "E", # pycodestyle - "F", # Pyflakes - "I", # isort - "ICN", # flake8-import-conventions - "PGH", # pygrep-hooks - "PIE", # flake8-pie - "PLC", # Pylint conventions - "PLE", # Pylint errors - "PLR091", # Pylint refactor just for max-args, max-branches, etc. - "PYI", # flake8-pyi - "RSE", # flake8-raise - "RUF", # Ruff-specific rules - "T10", # flake8-debugger - "TCH", # flake8-type-checking - "TID", # flake8-tidy-imports - "UP", # pyupgrade - "W", # pycodestyle - "YTT", # flake8-2020 + "C4", # flake8-comprehensions + "C90", # mccabe + "E", # pycodestyle + "F", # Pyflakes + "I", # isort + "ICN", # flake8-import-conventions + "PGH", # pygrep-hooks + "PIE", # flake8-pie + "PLC", # Pylint conventions + "PLE", # Pylint errors + "PLR091", # Pylint refactor just for max-args, max-branches, etc. + "PYI", # flake8-pyi + "RSE", # flake8-raise + "RUF", # Ruff-specific rules + "T10", # flake8-debugger + "TCH", # flake8-type-checking + "TID", # flake8-tidy-imports + "UP", # pyupgrade + "W", # pycodestyle + "YTT", # flake8-2020 ] ignore = [ "E402", @@ -31,19 +34,11 @@ ignore = [ "PLC1901", "RUF001", ] -line-length = 616 -target-version = "py37" - -[tool.ruff.mccabe] -max-complexity = 21 - -[tool.ruff.pylint] -max-args = 8 -max-branches = 18 -max-statements = 73 - -[tool.ruff.per-file-ignores] -"test/*" = ["S101"] +mccabe.max-complexity = 21 +per-file-ignores."test/*" = [ "S101" ] +pylint.max-args = 8 +pylint.max-branches = 18 +pylint.max-statements = 73 [tool.codespell] ignore-words-list = 'didnt'