Skip to content

Commit 186a976

Browse files
authored
chore: add even more ruff (#1175)
Turning on more ruff, based on `uvx --from sp-repo-review[cli] sp-ruff-checks .`. Signed-off-by: Henry Schreiner <[email protected]>
1 parent 9d91c6a commit 186a976

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

pyproject.toml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,20 @@ extend-select = [
250250
"ANN", # flake8-annotations
251251
"ARG", # flake8-unused-arguments
252252
"B", # flake8-bugbear
253+
"BLE", # flake8-blind-except
253254
"C4", # flake8-comprehensions
255+
"DTZ", # flake8-datetimez
254256
"EM", # flake8-errmsg
257+
"EXE", # flake8-executable
258+
"FA", # flake8-future-annotations
255259
"FBT", # flake8-boolean-trap
256260
"FLY", # flynt
261+
"FURB", # refurb
262+
"G", # flake8-logging-format
257263
"I", # isort
258264
"ICN", # flake8-import-conventions
259265
"ISC", # flake8-implicit-str-concat
266+
"LOG", # flake8-logging
260267
"N", # flake8-naming
261268
"PERF", # perflint
262269
"PGH", # pygrep-hooks
@@ -265,24 +272,23 @@ extend-select = [
265272
"PT", # flake8-pytest-style
266273
"PTH", # flake8-use-pathlib
267274
"PYI", # flake8-pyi
275+
"Q", # flake8-quotes
268276
"RET", # flake8-return
277+
"RSE", # flake8-raise
269278
"RUF", # Ruff-specific
270279
"S", # eval -> literal_eval
271280
"SIM", # flake8-simplify
281+
"SLOT", # flake8-slots
282+
"T10", # flake8-debugger
272283
"T20", # flake8-print
273284
"TC", # flake8-type-checking
274285
"TID251", # flake8-tidy-imports.banned-api
275286
"TRY", # tryceratops
276287
"UP", # pyupgrade
277288
"YTT", # flake8-2020
278-
"FURB", # refurb
279-
"SLOT", # flake8-slots
280-
"DTZ", # flake8-datetimez
281-
"FA", # flake8-future-annotations
282289
]
283290
ignore = [
284291
"ANN401", # Disallow dynamically typed expressions
285-
"ISC001", # Conflicts with formatter
286292
"PLC0415", # Import should be at top of file
287293
"PLE1205", # Format check doesn't work with our custom logger
288294
"PLR09", # Too many ...

src/scikit_build_core/settings/sources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def convert_target(self, target: type[T], *prefixes: str) -> T:
586586
prep[field.name] = self.convert_target(
587587
field.type, *prefixes, field.name
588588
)
589-
except Exception as e:
589+
except Exception as e: # noqa: BLE001
590590
name = ".".join([*self.prefixes, *prefixes, field.name])
591591
e.__notes__ = [*getattr(e, "__notes__", []), f"Field: {name}"] # type: ignore[attr-defined]
592592
errors.append(e)
@@ -599,7 +599,7 @@ def convert_target(self, target: type[T], *prefixes: str) -> T:
599599
simple = source.get_item(*prefixes, field.name, is_dict=is_dict)
600600
try:
601601
tmp = source.convert(simple, field.type)
602-
except Exception as e:
602+
except Exception as e: # noqa: BLE001
603603
name = ".".join([*self.prefixes, *prefixes, field.name])
604604
e.__notes__ = [*getattr(e, "__notes__", []), f"Field {name}"] # type: ignore[attr-defined]
605605
errors.append(e)

0 commit comments

Comments
 (0)