Skip to content

Commit e33dd8c

Browse files
[pre-commit.ci] pre-commit autoupdate (#8)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fdd5b89 commit e33dd8c

2 files changed

Lines changed: 19 additions & 23 deletions

File tree

.pre-commit-config.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@ repos:
88
rev: v2.2.6
99
hooks:
1010
- id: codespell
11-
additional_dependencies: [ "tomli>=2.0.1" ]
12-
- repo: https://github.com/PyCQA/docformatter
13-
rev: v1.7.5
11+
args: ["--write-changes"]
12+
- repo: https://github.com/tox-dev/tox-ini-fmt
13+
rev: "1.3.1"
1414
hooks:
15-
- id: docformatter
16-
additional_dependencies: [ "tomli>=2.0.1" ]
17-
args: [ "--in-place", "--config", "./pyproject.toml" ]
18-
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: "v0.2.0"
20-
hooks:
21-
- id: ruff-format
22-
- id: ruff
23-
args: [ "--fix", "--unsafe-fixes", "--exit-non-zero-on-fix" ]
15+
- id: tox-ini-fmt
16+
args: ["-p", "fix"]
2417
- repo: https://github.com/tox-dev/pyproject-fmt
2518
rev: "1.7.0"
2619
hooks:
2720
- id: pyproject-fmt
2821
additional_dependencies: ["tox>=4.12.1"]
22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: "v0.2.1"
24+
hooks:
25+
- id: ruff-format
26+
- id: ruff
27+
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
2928
- repo: meta
3029
hooks:
3130
- id: check-hooks-apply

pyproject.toml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ build.hooks.vcs.version-file = "src/py_discovery/_version.py"
6666
version.source = "vcs"
6767

6868
[tool.ruff]
69-
select = ["ALL"]
7069
line-length = 120
7170
target-version = "py37"
72-
isort = { known-first-party = ["py_discovery"], required-imports = ["from __future__ import annotations"] }
73-
ignore = [
71+
lint.isort = { known-first-party = ["py_discovery"], required-imports = ["from __future__ import annotations"] }
72+
lint.select = ["ALL"]
73+
lint.ignore = [
7474
"INP001", # no implicit namespaces here
7575
"ANN101", # Missing type annotation for `self` in method
7676
"ANN102", # Missing type annotation for `cls` in classmethod"
@@ -79,9 +79,13 @@ ignore = [
7979
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
8080
"S104", # Possible binding to all interfaces
8181
"CPY", # no copyright
82+
"COM812", # Conflict with formatter
83+
"ISC001", # Conflict with formatter
8284
]
83-
format.preview = true
8485
lint.preview = true
86+
format.preview = true
87+
format.docstring-code-format = true
88+
format.docstring-code-line-length = 100
8589
[tool.ruff.per-file-ignores]
8690
"tests/**/*.py" = [
8791
"S101", # asserts allowed in tests
@@ -100,13 +104,6 @@ builtin = "clear,usage,en-GB_to_en-US"
100104
count = true
101105
quiet-level = 3
102106

103-
[tool.docformatter]
104-
blank = true
105-
recursive = true
106-
pre-summary-newline = true
107-
wrap-descriptions = 120
108-
wrap-summaries = 120
109-
110107
[tool.coverage]
111108
report.fail_under = 87
112109
html.show_contexts = true

0 commit comments

Comments
 (0)