Skip to content

Commit 23539aa

Browse files
committed
More mypy fixes
1 parent a7e9ccb commit 23539aa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

numcodecs/tests/test_entrypoints_backport.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import importlib
1+
import importlib.util
22
import os.path
33
import sys
44
from multiprocessing import Process
@@ -7,7 +7,8 @@
77

88
import numcodecs.registry
99

10-
if not importlib.util.find_spec("importlib_metadata").loader: # pragma: no cover
10+
importlib_spec = importlib.util.find_spec("importlib_metadata")
11+
if importlib_spec is None or not importlib_spec.loader: # pragma: no cover
1112
pytest.skip(
1213
"This test module requires importlib_metadata to be installed",
1314
allow_module_level=True,

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,7 @@ quote-style = "preserve"
178178
[tool.mypy]
179179
ignore_errors = false
180180
ignore_missing_imports = true
181+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
182+
# TODO: set options below to true
183+
strict = false
184+
warn_unreachable = false

0 commit comments

Comments
 (0)