diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9b8404..a36dfcb 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.3" + rev: "2.1.1" hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.14.2"] diff --git a/pyproject.toml b/pyproject.toml index 671bb88..fe45afe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,11 +72,25 @@ version.source = "vcs" line-length = 120 [tool.ruff] -line-length = 120 target-version = "py39" +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 imports + "PLR0913", # any number of arguments in tests + "PLR0917", # any number of arguments in tests + "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 = [ "sphinx_autodoc_typehints", "tests", @@ -86,29 +100,14 @@ lint.isort = { known-first-party = [ lint.ignore = [ "ANN101", # no type annotation for self "ANN401", # allow Any as type annotation + "COM812", # Conflict with formatter + "CPY", # No copyright statements "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 interface - "COM812", # Conflict with formatter "ISC001", # Conflict with formatter - "CPY", # No copyright statements + "S104", # Possible binding to all interface ] 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 - "PLR0913", # any number of arguments in tests - "PLR0917", # any number of arguments in tests - "PLC2701", # private imports -] [tool.codespell] builtin = "clear,usage,en-GB_to_en-US"