Skip to content

have a concept of user code vs library code when typechecking #1918

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

Closed
ddfisher opened this issue Jul 21, 2016 · 2 comments
Closed

have a concept of user code vs library code when typechecking #1918

ddfisher opened this issue Jul 21, 2016 · 2 comments

Comments

@ddfisher
Copy link
Collaborator

Certain warning options shouldn't trigger on typeshed (and other library code). See #1554 and #1884, for example. This is currently handled with the is_typeshed_stub bool in TypeChecker. Unfortunately, this doesn't work for other libraries and doesn't allow us to purposefully run these checks on typeshed. Instead, we could have a concept of user code vs library code, where code mypy was specifically run on has these warnings enabled, and other code does not.

Down the line, we might also want to use this flag to avoid typechecking library code when it's referenced from user code -- we could limit ourselves to reading the types.

@gvanrossum
Copy link
Member

Maybe there should be flags (in the setup file?) to specify patterns for what's considered to be in each category?

@ilevkivskyi
Copy link
Member

I think this is now superseded by PEP 561.

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

3 participants