8000 Support max version marker of stdlib typeshed modules by srittau · Pull Request #10402 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Support max version marker of stdlib typeshed modules #10402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Support '2.7-' VERSIONS format
  • Loading branch information
srittau committed May 3, 2021
commit 866ee316ded61e1f61207ee33b6f31450493ffa3
3 changes: 2 additions & 1 deletion mypy/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ def load_stdlib_py_versions(custom_typeshed_dir: Optional[str]
module, version_range = line.split(":")
versions = version_range.split("-")
min_version = parse_version(versions[0])
max_version = parse_version(versions[1]) if len(versions) >= 2 else None
max_version = (parse_version(versions[1])
if len(versions) >= 2 and versions[1].strip() else None)
result[module] = min_version, max_version

# Modules that are Python 2 only or have separate Python 2 stubs
Expand Down
0