diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb581af38..612df96ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "2.0.4" + rev: "2.1.1" hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit diff --git a/pyproject.toml b/pyproject.toml index 49cd2388b..88407403b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,47 +105,46 @@ build.targets.sdist.include = [ version.source = "vcs" [tool.ruff] -line-length = 120 target-version = "py37" +line-length = 120 +format.preview = true +format.docstring-code-line-length = 100 +format.docstring-code-format = true +lint.select = [ + "ALL", +] +lint.per-file-ignores."tests/**/*.py" = [ + "D", # don't care about documentation in tests + "FBT", # don"t care about booleans as positional arguments in tests + "INP001", # no implicit namespace + "PLC2701", # Private import + "PLR2004", # Magic value used in comparison, consider replacing with a constant variable + "S101", # asserts allowed in tests... + "S603", # `subprocess` call: check for execution of untrusted input +] lint.isort = { known-first-party = [ "virtualenv", ], required-imports = [ "from __future__ import annotations", ] } -lint.select = [ - "ALL", -] lint.ignore = [ - "CPY", # No copyright header "ANN", # no type checking added yet + "COM812", # conflict with formatter + "CPY", # No copyright header "D10", # no docstrings "D40", # no imperative mode for docstrings - "PTH", # no pathlib, <=39 has problems on Windows with absolute/resolve, can revisit once we no longer need 39 - "INP001", # ignore implicit namespace packages "D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible - "S104", # Possible binding to all interfaces - "S404", # Using subprocess is alright + "INP001", # ignore implicit namespace packages + "ISC001", # conflict with formatter "PLR0914", # Too many local variables "PLR0917", # Too many positional arguments "PLR6301", # Method could be a function, class method, or static method - "COM812", # conflict with formatter - "ISC001", # conflict with formatter + "PTH", # no pathlib, <=39 has problems on Windows with absolute/resolve, can revisit once we no longer need 39 + "S104", # Possible binding to all interfaces + "S404", # Using subprocess is alright ] lint.preview = true -format.preview = true -format.docstring-code-format = true -format.docstring-code-line-length = 100 -[tool.ruff.lint.per-file-ignores] -"tests/**/*.py" = [ - "S101", # asserts allowed in tests... - "FBT", # don"t care about booleans as positional arguments in tests - "INP001", # no implicit namespace - "D", # don't care about documentation in tests - "S603", # `subprocess` call: check for execution of untrusted input - "PLR2004", # Magic value used in comparison, consider replacing with a constant variable - "PLC2701", # Private import -] [tool.codespell] builtin = "clear,usage,en-GB_to_en-US"