From c101877e662d41ac52f590b1469afb828e13d929 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 19:23:53 -0700 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#135) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- pyproject.toml | 65 ++++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd1d0ba..47b9512 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.12.1"] diff --git a/pyproject.toml b/pyproject.toml index 0988639..2194450 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,54 +71,53 @@ build.hooks.vcs.version-file = "src/pyproject_api/_version.py" version.source = "vcs" [tool.ruff] -line-length = 120 target-version = "py38" -lint.isort = { known-first-party = [ - "pyproject_api", -], required-imports = [ - "from __future__ import annotations", -] } +line-length = 120 +format.preview = true +format.docstring-code-line-length = 100 +format.docstring-code-format = true lint.select = [ "ALL", ] -lint.ignore = [ - "INP001", # no implicit namespaces here - "ANN101", # Missing type annotation for `self` in method - "ANN102", # Missing type annotation for `cls` in classmethod" - "ANN401", # Dynamically typed expressions - "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 -] -lint.preview = true -format.preview = true -format.docstring-code-format = true -format.docstring-code-line-length = 100 -[tool.ruff.lint.per-file-ignores] -"src/pyproject_api/_backend.py" = [ +lint.per-file-ignores."src/pyproject_api/_backend.py" = [ "ANN", - "UP", - "T201", "I002", + "T201", + "UP", ] # no type annotations -"src/pyproject_api/_backend.pyi" = [ +lint.per-file-ignores."src/pyproject_api/_backend.pyi" = [ "E301", "E302", ] # https://github.com/astral-sh/ruff/issues/10077 -"tests/**/*.py" = [ - "S101", # asserts allowed in tests... +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 - "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 imports - "PLR0917", # too many positional arguments "PLR0913", # too many positional arguments + "PLR0917", # too many positional arguments + "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 = [ + "pyproject_api", +], required-imports = [ + "from __future__ import annotations", +] } +lint.ignore = [ + "ANN101", # Missing type annotation for `self` in method + "ANN102", # Missing type annotation for `cls` in classmethod" + "ANN401", # Dynamically typed expressions + "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 + "INP001", # no implicit namespaces here + "ISC001", # Conflict with formatter + "S104", # Possible binding to all interface +] +lint.preview = true [tool.codespell] builtin = "clear,usage,en-GB_to_en-US"