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

Add stubs for importlib.util #325

Merged
merged 2 commits into from
Jul 1, 2016
Merged

Conversation

brettcannon
Copy link
Member

Closes #189

@gvanrossum gvanrossum merged commit ab08dbb into python:master Jul 1, 2016
@gvanrossum
Copy link
Member

Great! It's entirely up to you to double-check that these stubs actually work -- neither mypy's test suite nor typeshed's verifies that a stub matches CPython. It would be hard to imagine how that would work anyways -- so we rely on people writing real code that uses a module and annotating it as a way to verify that the stubs are correct. I assume this won't be much of a challenge for you! But given the amount of code you just landed for #189 there is bound to be a bug somewhere, and it may take a while before someone runs into it. Godspeed!

@brettcannon
Copy link
Member Author

Is there an easy way to run mypy against Python's test_importlib test suite from a CPython checkout? That's probably the most comprehensive use of importlib that I know of.

@gvanrossum
Copy link
Member

You could just copy that package somewhere else and run mypy on it. But you'd probably first have to add annotations to the tests, which might be a huge task by itself. Also the use of mocks might possibly cause problems.

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

Successfully merging this pull request may close these issues.

2 participants