Fix type errors in scripts and add to pyright checked set

This commit is contained in:
Mark Backman
2026-04-21 16:17:49 -04:00
parent 609a0a14e7
commit 10e58d6e42
6 changed files with 25 additions and 19 deletions

View File

@@ -79,6 +79,8 @@ def load_module_from_path(path: str | Path):
module_name = path.stem
spec = importlib.util.spec_from_file_location(module_name, str(path))
if spec is None or spec.loader is None:
raise ImportError(f"Could not load module spec from {path}")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module