From b21c06999a1354163edefe05b3d56ddb893a1705 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:50:54 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.2.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.2.1) Signed-off-by: Bernát Gábor --- .pre-commit-config.yaml | 23 +++++++++++------------ pyproject.toml | 19 ++++++++----------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e009159..b23c89a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,24 +8,23 @@ repos: rev: v2.2.6 hooks: - id: codespell - additional_dependencies: [ "tomli>=2.0.1" ] - - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + args: ["--write-changes"] + - repo: https://github.com/tox-dev/tox-ini-fmt + rev: "1.3.1" hooks: - - id: docformatter - additional_dependencies: [ "tomli>=2.0.1" ] - args: [ "--in-place", "--config", "./pyproject.toml" ] - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.2.0" - hooks: - - id: ruff-format - - id: ruff - args: [ "--fix", "--unsafe-fixes", "--exit-non-zero-on-fix" ] + - id: tox-ini-fmt + args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt rev: "1.7.0" hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.12.1"] + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.2.1" + hooks: + - id: ruff-format + - id: ruff + args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] - repo: meta hooks: - id: check-hooks-apply diff --git a/pyproject.toml b/pyproject.toml index e3216be..23c2f57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,11 +66,11 @@ build.hooks.vcs.version-file = "src/py_discovery/_version.py" version.source = "vcs" [tool.ruff] -select = ["ALL"] line-length = 120 target-version = "py37" -isort = { known-first-party = ["py_discovery"], required-imports = ["from __future__ import annotations"] } -ignore = [ +lint.isort = { known-first-party = ["py_discovery"], required-imports = ["from __future__ import annotations"] } +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" @@ -79,9 +79,13 @@ ignore = [ "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible "S104", # Possible binding to all interfaces "CPY", # no copyright + "COM812", # Conflict with formatter + "ISC001", # Conflict with formatter ] -format.preview = true lint.preview = true +format.preview = true +format.docstring-code-format = true +format.docstring-code-line-length = 100 [tool.ruff.per-file-ignores] "tests/**/*.py" = [ "S101", # asserts allowed in tests @@ -100,13 +104,6 @@ builtin = "clear,usage,en-GB_to_en-US" count = true quiet-level = 3 -[tool.docformatter] -blank = true -recursive = true -pre-summary-newline = true -wrap-descriptions = 120 -wrap-summaries = 120 - [tool.coverage] report.fail_under = 87 html.show_contexts = true