Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8449606

Browse files
authored
Add assertion to help debugging typeshed issues (#9982)
In some cases the VERSIONS file can't be found, and it's kind of hard to debug.
1 parent 56061c9 commit 8449606

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mypy/modulefinder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ def load_stdlib_py_versions(custom_typeshed_dir: Optional[str]) -> Dict[str, Tup
692692
result = {}
693693

694694
versions_path = os.path.join(stdlib_dir, "VERSIONS")
695+
assert os.path.isfile(versions_path), (custom_typeshed_dir, versions_path, __file__)
695696
with open(versions_path) as f:
696697
for line in f:
697698
line = line.strip()

0 commit comments

Comments
 (0)