Skip to content

Commit a17e16b

Browse files
committed
Fix recent ruff linter warnings
1 parent 7fe3e43 commit a17e16b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/charonload/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
required_version = (3, 8)
2424

2525
if sys.version_info[:2] < required_version: # pragma: no cover
26-
msg = "%s requires Python %d.%d+" % (__package__, *required_version)
26+
msg = "%s requires Python %d.%d+" % (__package__, *required_version) # noqa: UP031
2727
raise RuntimeError(msg)
2828

2929
del required_version
@@ -58,10 +58,10 @@
5858
"CommandNotFoundError",
5959
"Config",
6060
"ConfigDict",
61-
"extension_finder",
6261
"JITCompileError",
6362
"JITCompileFinder",
64-
"module_config",
6563
"ResolvedConfig",
6664
"StubGenerationError",
65+
"extension_finder",
66+
"module_config",
6767
]

src/charonload/_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self: Self, step_name: str = "", log: str | None = None) -> None:
2929

3030
super().__init__(f"{self.step_name} failed:\n\n{self.log}" if log is not None else f"{self.step_name} failed.")
3131

32-
def __new__(cls: type[Self], *args: Any, **kwargs: Any) -> Self: # noqa: ANN401, ARG003
32+
def __new__(cls: type[Self], *args: Any, **kwargs: Any) -> Self: # noqa: ANN401, ARG004
3333
if cls is JITCompileError:
3434
msg = f"Cannot instantiate abstract class {cls.__name__}"
3535
raise TypeError(msg)

src/charonload/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _is_compatible(ver1: str, ver2: str) -> bool:
1515
def _str_to_tuple(ver: str) -> tuple[int, int, int]:
1616
components = list(map(int, ver.split(".")))
1717
components = [*components, 0, 0][:3]
18-
return cast(tuple[int, int, int], tuple(components))
18+
return cast("tuple[int, int, int]", tuple(components))
1919

2020

2121
def _same_minor_version(ver1: tuple[int, int, int], ver2: tuple[int, int, int]) -> bool:

0 commit comments

Comments
 (0)