Skip to content

Commit

Permalink
Merge pull request #207 from jenshnielsen/fix_type_checking_mypy_9
Browse files Browse the repository at this point in the history
Fix typechecking with mypy 0.9xx
  • Loading branch information
astafan8 committed Jun 15, 2021
2 parents 601fca2 + b3bc2e8 commit 96ba4bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plottr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def config(names: Optional[List[str]] = None) -> \
this_cfg = {}
for filep in configFiles(filen)[::-1]:
spec = spec_from_file_location(modn, filep)
if spec is None:
raise FileNotFoundError(f"Could not locate spec for {modn}, {filep}")
mod = module_from_spec(spec)
sys.modules[modn] = mod
assert isinstance(spec.loader, Loader)
Expand Down

0 comments on commit 96ba4bf

Please sign in to comment.