Skip to content

Commit da25ff9

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

3 files changed

Lines changed: 44 additions & 28 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/codespell-project/codespell
8-
rev: v2.2.6
8+
rev: v2.3.0
99
hooks:
1010
- id: codespell
1111
args: ["--write-changes"]
@@ -15,12 +15,12 @@ repos:
1515
- id: tox-ini-fmt
1616
args: ["-p", "fix"]
1717
- repo: https://github.com/tox-dev/pyproject-fmt
18-
rev: "1.8.0"
18+
rev: "2.1.3"
1919
hooks:
2020
- id: pyproject-fmt
2121
additional_dependencies: ["tox>=4.12.1"]
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: "v0.4.1"
23+
rev: "v0.4.9"
2424
hooks:
2525
- id: ruff-format
2626
- id: ruff

pyproject.toml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ keywords = [
1717
"virtual",
1818
]
1919
license = "MIT"
20-
maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
21-
authors = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
20+
maintainers = [
21+
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
22+
]
23+
authors = [
24+
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
25+
]
2226
requires-python = ">=3.7"
2327
classifiers = [
2428
"Development Status :: 5 - Production/Stable",
@@ -43,7 +47,7 @@ dynamic = [
4347
"version",
4448
]
4549
dependencies = [
46-
'typing-extensions>=4.7.1; python_version < "3.11"',
50+
"typing-extensions>=4.7.1; python_version<'3.11'",
4751
]
4852
optional-dependencies.docs = [
4953
"furo>=2024.1.29",
@@ -66,38 +70,43 @@ build.hooks.vcs.version-file = "src/py_discovery/_version.py"
6670
version.source = "vcs"
6771

6872
[tool.ruff]
69-
line-length = 120
7073
target-version = "py37"
71-
lint.isort = { known-first-party = ["py_discovery"], required-imports = ["from __future__ import annotations"] }
72-
lint.select = ["ALL"]
74+
line-length = 120
75+
format.preview = true
76+
format.docstring-code-line-length = 100
77+
format.docstring-code-format = true
78+
lint.select = [
79+
"ALL",
80+
]
7381
lint.ignore = [
74-
"INP001", # no implicit namespaces here
7582
"ANN101", # Missing type annotation for `self` in method
7683
"ANN102", # Missing type annotation for `cls` in classmethod"
7784
"ANN401", # Dynamically typed expressions
85+
"COM812", # Conflict with formatter
86+
"CPY", # no copyright
7887
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
7988
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
80-
"S104", # Possible binding to all interfaces
81-
"CPY", # no copyright
82-
"COM812", # Conflict with formatter
89+
"INP001", # no implicit namespaces here
8390
"ISC001", # Conflict with formatter
91+
"S104", # Possible binding to all interfaces
8492
]
85-
lint.preview = true
86-
format.preview = true
87-
format.docstring-code-format = true
88-
format.docstring-code-line-length = 100
89-
[tool.ruff.lint.per-file-ignores]
90-
"tests/**/*.py" = [
91-
"S101", # asserts allowed in tests
93+
lint.per-file-ignores."tests/**/*.py" = [
94+
"D", # don't care about documentation in tests
9295
"FBT", # don't care about booleans as positional arguments in tests
9396
"INP001", # no implicit namespace
94-
"D", # don't care about documentation in tests
95-
"S603", # `subprocess` call: check for execution of untrusted input
96-
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
97+
"PLC0415", # import at top
9798
"PLC2701", # Private imports
9899
"PLR0917", # too many positional arguments
99-
"PLC0415", # import at top
100+
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
101+
"S101", # asserts allowed in tests
102+
"S603", # `subprocess` call: check for execution of untrusted input
100103
]
104+
lint.isort = { known-first-party = [
105+
"py_discovery",
106+
], required-imports = [
107+
"from __future__ import annotations",
108+
] }
109+
lint.preview = true
101110

102111
[tool.codespell]
103112
builtin = "clear,usage,en-GB_to_en-US"
@@ -117,12 +126,19 @@ paths.source = [
117126
"*/src",
118127
"*\\src",
119128
]
120-
report.omit = []
129+
report.omit = [
130+
]
121131
run.parallel = true
122-
run.plugins = ["covdefaults"]
132+
run.plugins = [
133+
"covdefaults",
134+
]
123135

124136
[tool.mypy]
125137
python_version = "3.8"
126138
show_error_codes = true
127139
strict = true
128-
overrides = [{ module = ["setuptools.*"], ignore_missing_imports = true }]
140+
overrides = [
141+
{ module = [
142+
"setuptools.*",
143+
], ignore_missing_imports = true },
144+
]

src/py_discovery/_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def from_exe(
402402
if isinstance(proposed, PythonInfo) and resolve_to_host:
403403
try:
404404
proposed = proposed._resolve_to_system(proposed) # noqa: SLF001
405-
except Exception as exception: # noqa: BLE001
405+
except Exception as exception:
406406
if raise_on_error:
407407
raise
408408
logging.info("ignore %s due cannot resolve system due to %r", proposed.original_executable, exception)

0 commit comments

Comments
 (0)