-
Notifications
You must be signed in to change notification settings - Fork 93
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 library stubs for use with mypy #2026
Comments
@thofler @marcoskirsch This seems like a duplicate of #1887 . I think we'd prefer to add actual type hints. I don't think these stubs would be very useful.
|
Further explanation for @thofler. We code-generate our APIs based on metadata, with only a few hand-coded functions. It wouldn't make sense for us to have a bunch of manually-edited stubs. Better to just generate the annotations. |
Seems like a duplicate of #1887 |
We're in agreement, then. I'll close it. |
Duplicate of #1887 |
Stub files are a way of adding type hints without changing your actual code. It doesn't matter to users whether you add type hints to your code or you add You can even generate That said, I think the main reasons to use stub files (Python 2.x compatibility, package stubs separately from the code they are annotating) don't apply here, so it's better to add type hints to the actual code. |
Description of issue
It would be nice to be able to use mypy to check for issues in python applications using nidcpower (https://mypy.readthedocs.io/en/stable/).
Consider providing library stubs to enable this to work.
For applications using mypy to check other modules, need to disable checking nidcpower as described in the mypy docs:
[mypy-nidcpower.*]
ignore_missing_imports = True
The text was updated successfully, but these errors were encountered: