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

importlib.util.spec_from_file_location is not picked up from typeshed #464

Open
JelleZijlstra opened this issue Feb 6, 2022 · 0 comments

Comments

@JelleZijlstra
Copy link
Contributor

It's because it's actually in _frozen_importlib_external:

In [37]: importlib.util.spec_from_file_location.__module__
Out[37]: '_frozen_importlib_external'

Possible fixes:

  • Change typeshed to put it in the right module
  • Hardcode the mapping in pyanalyze's typeshed.py
  • Introduce a new mechanism where a KnownValue remembers how it was created, so we know to look into importlib.util stubs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant