diff --git a/tests/test_cli_security.py b/tests/test_cli_security.py index ec9a7ea..16ce614 100644 --- a/tests/test_cli_security.py +++ b/tests/test_cli_security.py @@ -18,7 +18,10 @@ def load_fpaste_module(): ) if spec is None or spec.loader is None: pytest.skip("Could not load fpaste module") + return None # unreachable, but helps mypy + assert spec is not None # mypy: narrow type after skip + assert spec.loader is not None fpaste = importlib.util.module_from_spec(spec) sys.modules["fpaste"] = fpaste spec.loader.exec_module(fpaste)