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

treat a package as if it had py.typed #10783

Closed
davidism opened this issue Jul 7, 2021 · 1 comment
Closed

treat a package as if it had py.typed #10783

davidism opened this issue Jul 7, 2021 · 1 comment
Labels

Comments

@davidism
Copy link

davidism commented Jul 7, 2021

I would like to be able to force mypy to look at the types provided by a package even if it does not provide a py.typed file. I've found that some packages I use have added good type annotations, but didn't realize they needed to provide a py.typed file as well. Some of these packages are only lightly maintained, so they may not get a new release with the file included any time soon.

mypy will ignore typing if py.typed isn't present, but it seems like that's something that should be overridable, just like you can tell mypy to ignore_missing_imports if a package doesn't have typing. I suggest a corresponding configuration such as assume_typed_imports.

An example of such a package is inflect. I opened an issue jaraco/inflect#133 and PR jaraco/inflect#135 to add the file, but it hasn't received attention. I have to add ignore_missing_imports currently.

@ethanhs
Copy link
Collaborator

ethanhs commented Jul 7, 2021

I believe this is a duplicate of #8545.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants