Skip to content

Commit 50842c5

Browse files
committed
More mypy fixes
1 parent 3b2eebd commit 50842c5

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
@@ -181,3 +181,7 @@ quote-style = "preserve"
181181
[tool.mypy]
182182
ignore_errors = false
183183
ignore_missing_imports = true
184+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
185+
# TODO: set options below to true
186+
strict = false
187+
warn_unreachable = false

0 commit comments

Comments
 (0)