-
Notifications
You must be signed in to change notification settings - Fork 690
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
Make anomalib PEP 561 compliant for mypy #1038
Make anomalib PEP 561 compliant for mypy #1038
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we need to also include a line in setup.py
. Something like
package_data={"anomalib": ["py.typed"]},
Hi, Vaidya, Some more information about: Conclusion: |
I tried using both |
Maybe we could verify this by uploading to test-pypi? |
This enables PEP 561 compliance for mypy via adding py.typed and MANIFEST.in. Fixes openvinotoolkit#1015 Signed-off-by: Yuan, Jinjie <[email protected]> Signed-off-by: Kang Wenjing <[email protected]>
89e3f07
to
33d55d2
Compare
We could merge this once the CI passes. |
I just did an install of |
Description
This PR aims to make anomalib PEP 561 compliant for mypy:
reference:
https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages
If we have a
test_mypy.py
for testing with the following content:from anomalib.config import get_configurable_parameters, update_nncf_config
Before this PR, when running:
mypy test_pep561.py
, it will generate the following error.After this PR, it will have the following output:
Success: no issues found in 1 source file
This shows that this PR can make anomalib PEP 561 compliant for mypy.
Changes
Checklist