Skip to content

Commit c2a1d97

Browse files
committed
Fix and suppress more ruff linter warnings
1 parent d0493f7 commit c2a1d97

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ typing-modules = ["charonload._compat.typing"]
136136
"D", # pydocstyle
137137
]
138138
"tests/*" = [
139-
"D", # pydocstyle
140-
"S101", # assert-used
141-
"INP", # flake8-no-pep420
142-
"PT011", # raises-too-broad
139+
"D", # pydocstyle
140+
"S101", # assert-used
141+
"INP", # flake8-no-pep420
142+
"PT011", # raises-too-broad
143+
"PLC0415", # import-outside-top-level
143144
]
144145
"docs/conf.py" = [
145146
"D100", # undocumented-public-module

src/charonload/_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def _resolve(self: Self, module_name: str, config: Config) -> ResolvedConfig:
253253
verbose=self._str_to_bool(os.environ.get("CHARONLOAD_FORCE_VERBOSE", default=config.verbose)),
254254
)
255255

256-
def _str_to_bool(self: Self, s: str | bool) -> bool:
256+
def _str_to_bool(self: Self, s: str | bool) -> bool: # noqa: FBT001
257257
if isinstance(s, bool):
258258
return s
259259

tests/test_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def test_torch_clean_build_compatible_version(shared_datadir: pathlib.Path, tmp_
704704
(build_directory / "charonload").mkdir(parents=True, exist_ok=True)
705705
dirty_file.touch()
706706
with (build_directory / "charonload" / "version.txt").open("w") as f:
707-
f.write(".".join(charonload.__version__.split(".")[:-1] + ["9999"]))
707+
f.write(".".join([*charonload.__version__.split(".")[:-1], "9999"]))
708708

709709
assert dirty_file.exists()
710710

0 commit comments

Comments
 (0)