Skip to content

Commit 076df8e

Browse files
committed
chore: add a few ruff checks
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 3f371ff commit 076df8e

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

pyproject.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,21 +276,24 @@ extend-select = [
276276
"UP", # pyupgrade
277277
"YTT", # flake8-2020
278278
"FURB", # refurb
279+
"SLOT", # flake8-slots
280+
"DTZ", # flake8-datetimez
281+
"FA", # flake8-future-annotations
279282
]
280283
ignore = [
281-
"PLE1205", # Format check doesn't work with our custom logger
282-
"PT013", # It's correct to import classes for typing!
283-
"RUF009", # Too easy to get a false positive
284-
"PYI025", # Wants Set to be renamed AbstractSet
284+
"ANN401", # Disallow dynamically typed expressions
285285
"ISC001", # Conflicts with formatter
286+
"PLC0415", # Import should be at top of file
287+
"PLE1205", # Format check doesn't work with our custom logger
286288
"PLR09", # Too many ...
287289
"PLR2004", # Magic value used in comparison
288-
"PLC0415", # Import should be at top of file
289-
"ANN401", # Disallow dynamically typed expressions
290+
"PT013", # It's correct to import classes for typing!
291+
"PYI025", # Wants Set to be renamed AbstractSet
292+
"RUF009", # Too easy to get a false positive
290293
"S101", # Use of assert detected
294+
"S404", # subprocess module is possibly insecure
291295
"S603", # subprocess untrusted input
292296
"S607", # subprocess call
293-
"S404", # subprocess module is possibly insecure
294297
]
295298
typing-modules = ["scikit_build_core._compat.typing"]
296299

@@ -323,9 +326,11 @@ known-local-folder = ["pathutils"]
323326
"noxfile.py" = ["T20", "TID251"]
324327
"src/scikit_build_core/resources/*.py" = ["PTH", "ARG002", "FBT", "TID251"]
325328
"src/scikit_build_core/_compat/**.py" = ["TID251"]
326-
"src/scikit_build_core/settings/**.py" = ["FBT001"]
329+
"src/scikit_build_core/settings/**.py" = ["FBT001", "FA"]
330+
"src/scikit_build_core/file_api/**.py" = ["FA"]
327331
"tests/conftest.py" = ["TID251"]
328332
"tests/packages/**.py" = ["TID251"]
333+
"tests/test_settings.py" = ["FA"]
329334
"docs/conf.py" = ["TID251"]
330335
"docs/examples/**" = ["ANN"]
331336
"src/scikit_build_core/file_api/model/*.py" = ["N"]

src/scikit_build_core/settings/skbuild_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class CMakeSettingsDefine(str):
4141
to the CMake representation in the `cmake.define` settings key.
4242
"""
4343

44+
__slots__ = ()
45+
4446
json_schema = Union[str, bool, List[str]]
4547

4648
def __new__(cls, raw: Union[str, bool, List[str]]) -> "CMakeSettingsDefine":

0 commit comments

Comments
 (0)