Skip to content

Commit 9ed3539

Browse files
committed
chore: cleanup and bump pre-commit
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 8088209 commit 9ed3539

File tree

6 files changed

+15
-19
lines changed

6 files changed

+15
-19
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ repos:
5454
exclude: "^tests"
5555

5656
- repo: https://github.com/charliermarsh/ruff-pre-commit
57-
rev: v0.0.272
57+
rev: v0.0.275
5858
hooks:
5959
- id: ruff
6060
args: ["--fix", "--show-fixes"]
6161

6262
- repo: https://github.com/pre-commit/mirrors-mypy
63-
rev: v1.3.0
63+
rev: v1.4.0
6464
hooks:
6565
- id: mypy
6666
exclude: |

pyproject.toml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ dynamic = ["version"]
3434

3535
dependencies = [
3636
"exceptiongroup; python_version<'3.11'",
37-
"importlib-resources >=1.3; python_version<'3.9'",
3837
"importlib-metadata; python_version<'3.8'",
38+
"importlib-resources >=1.3; python_version<'3.9'",
3939
"packaging >=20.9",
4040
"tomli >=1.1; python_version<'3.11'",
4141
"typing-extensions >=3.10.0; python_version<'3.8'",
@@ -46,13 +46,12 @@ dependencies = [
4646

4747
[project.optional-dependencies]
4848
pyproject = [
49-
"pyproject-metadata >=0.5",
5049
"pathspec >=0.10.1",
50+
"pyproject-metadata >=0.5",
5151
]
5252
test = [
5353
"build[virtualenv]",
5454
"cattrs >=22.2.0",
55-
"importlib-metadata; python_version<'3.8'",
5655
"pathspec >=0.10.1",
5756
"pybind11",
5857
"pyproject-metadata >=0.5",
@@ -92,11 +91,11 @@ docs = [
9291
]
9392

9493
[project.urls]
95-
Homepage = "https://github.com/scikit-build/scikit-build-core"
96-
Documentation = "https://scikit-build-core.readthedocs.io"
94+
Changelog = "https://scikit-build-core.readthedocs.io/en/latest/changelog.html"
9795
Discussions = "https://github.com/orgs/scikit-build/discussions"
96+
Documentation = "https://scikit-build-core.readthedocs.io"
97+
Homepage = "https://github.com/scikit-build/scikit-build-core"
9898
Issues = "https://github.com/scikit-build/scikit-build-core/issues"
99-
Changelog = "https://scikit-build-core.readthedocs.io/en/latest/changelog.html"
10099

101100
[project.entry-points]
102101
"distutils.commands".build_cmake = "scikit_build_core.setuptools.build_cmake:BuildCMake"
@@ -115,10 +114,9 @@ addopts = ["-ra", "--strict-markers", "--strict-config"]
115114
xfail_strict = true
116115
filterwarnings = [
117116
"error",
118-
"ignore:pkg_resources is deprecated as an API:DeprecationWarning", # Caused by wheel in tests
117+
"ignore:pkg_resources is deprecated as an API:DeprecationWarning:wheel", # Caused by wheel in tests
119118
"ignore:Config variable '.*' is unset, Python ABI tag may be incorrect:RuntimeWarning",
120-
"ignore:onerror argument is deprecated, use onexc instead:DeprecationWarning", # Caused by wheel and Python 3.12
121-
"ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest", # Python 3.12
119+
"ignore:onerror argument is deprecated, use onexc instead:DeprecationWarning:wheel", # Caused by wheel and Python 3.12
122120
]
123121
log_cli_level = "info"
124122
testpaths = ["tests"]

src/scikit_build_core/builder/builder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def get_archs(env: Mapping[str, str], cmake_args: Sequence[str] = ()) -> list[st
4848
for cmake_arg in cmake_args:
4949
if "CMAKE_SYSTEM_PROCESSOR" in cmake_arg:
5050
return [cmake_arg.split("=")[1]]
51-
archs = re.findall(r"-arch (\S+)", env.get("ARCHFLAGS", ""))
52-
return archs
51+
return re.findall(r"-arch (\S+)", env.get("ARCHFLAGS", ""))
5352
if sys.platform.startswith("win") and get_platform(env) == "win-arm64":
5453
return ["win_arm64"]
5554

src/scikit_build_core/settings/sources.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ def convert(cls, item: str, target: type[Any]) -> object:
229229
return {k: cls.convert(v, _get_inner_type(target)) for k, v in items}
230230

231231
if raw_target is bool:
232-
result = item.strip().lower() not in {"0", "false", "off", "no", ""}
233-
return result
232+
return item.strip().lower() not in {"0", "false", "off", "no", ""}
234233

235234
if callable(raw_target):
236235
return raw_target(item)
@@ -339,8 +338,7 @@ def convert(
339338
msg = f"Expected {target}, got {type(item).__name__}"
340339
raise TypeError(msg)
341340
if raw_target is bool:
342-
result = item.strip().lower() not in {"0", "false", "off", "no", ""}
343-
return result
341+
return item.strip().lower() not in {"0", "false", "off", "no", ""}
344342
if callable(raw_target):
345343
return raw_target(item)
346344
msg = f"Can't convert target {target}"

src/scikit_build_core/setuptools/build_cmake.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import shutil
55
import sys
66
from pathlib import Path
7+
from typing import ClassVar
78

89
import setuptools
910
import setuptools.errors
@@ -48,7 +49,7 @@ class BuildCMake(setuptools.Command):
4849
parallel: int | None
4950
plat_name: str | None
5051

51-
user_options = [
52+
user_options: ClassVar[list[tuple[str, str, str]]] = [
5253
("build-lib=", "b", "directory for compiled extension modules"),
5354
("build-temp=", "t", "directory for temporary files (build by-products)"),
5455
("plat-name=", "p", "platform name to cross-compile for, if supported "),

tests/test_fileapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_included_dir():
106106
assert codemodel.kind == "codemodel"
107107
assert codemodel.version.major == 2
108108
assert codemodel.version.minor == 4
109-
assert codemodel.configurations[0].name == "" # noqa: PLC1901
109+
assert codemodel.configurations[0].name == ""
110110

111111
cache = index.reply.cache_v2
112112
assert cache is not None

0 commit comments

Comments
 (0)