Skip to content

Commit 9bc4023

Browse files
committed
chore: use config setting for RUF009
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 7a1b783 commit 9bc4023

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ ignore = ["W002"] # Triggers on __init__.py's
256256

257257

258258
[tool.ruff]
259+
show-fixes = true
259260
exclude = ["src/scikit_build_core/_vendor/*"]
260261

261262
[tool.ruff.lint]
@@ -274,7 +275,6 @@ ignore = [
274275
"PLR09", # Too many ...
275276
"PLR2004", # Magic value used in comparison
276277
"PT013", # It's correct to import classes for typing!
277-
"RUF009", # Too easy to get a false positive (function call in dataclass defaults)
278278
"S101", # Use of assert detected
279279
"S404", # subprocess module is possibly insecure
280280
"S603", # subprocess untrusted input
@@ -284,12 +284,16 @@ ignore = [
284284
"TID252", # Relative imports are fine
285285
]
286286
typing-modules = ["scikit_build_core._compat.typing"]
287+
isort.known-local-folder = ["pathutils"]
288+
flake8-bugbear.extend-immutable-calls = [
289+
"packaging.version.Version",
290+
"packaging.specifiers.SpecifierSet",
291+
]
292+
287293

288294
[tool.ruff.format]
289295
docstring-code-format = true
290296

291-
[tool.ruff.lint.isort]
292-
known-local-folder = ["pathutils"]
293297

294298
[tool.ruff.lint.flake8-tidy-imports.banned-api]
295299
"typing.Callable".msg = "Use collections.abc.Callable instead."

src/scikit_build_core/file_api/model/toolchains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ class Toolchain:
3838
@dataclasses.dataclass(frozen=True)
3939
class Toolchains:
4040
kind: str = "toolchains"
41-
version: APIVersion = APIVersion(1, 0)
41+
version: APIVersion = APIVersion(1, 0) # noqa: RUF009
4242
toolchains: List[Toolchain] = dataclasses.field(default_factory=list)

0 commit comments

Comments
 (0)