Skip to content
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

Fix 7412: Exception while typechecking: KeyError: 'typing' #7459

Merged
merged 2 commits into from Sep 5, 2019

Conversation

@gantsevdenis
Copy link
Contributor

commented Sep 4, 2019

fix for #7412 looks pretty simple... not sure if this solution is general enough

Copy link
Collaborator

left a comment

Great! Just one suggestion.

@@ -2303,6 +2303,7 @@ def find_module_and_diagnose(manager: BuildManager,
if (root_source # Honor top-level modules
or (not path.endswith('.py') # Stubs are always normal
and not options.follow_imports_for_stubs) # except when they aren't
or id == 'typing' # typing is not a stub, and is always normal

This comment has been minimized.

Copy link
@ilevkivskyi

ilevkivskyi Sep 4, 2019

Collaborator

I think this makes sense, to make it more general maybe use id not in mypy.semanal_main.core_modules instead of this line and the below one?

Copy link
Collaborator

left a comment

Thanks! LGTM.

@ilevkivskyi ilevkivskyi merged commit 98f3fec into python:master Sep 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.