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

Suggestion: Add Mypy library stubs / typing #30

Open
OscarVanL opened this issue Oct 22, 2024 · 3 comments
Open

Suggestion: Add Mypy library stubs / typing #30

OscarVanL opened this issue Oct 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@OscarVanL
Copy link

I get this error from Mypy:

src/py_utils/headers.py:1: error: Cannot find implementation or library stub for module named "secure"  [import-not-found]
src/py_utils/headers.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

It'd be great if the library provided typing for Mypy 😁

@OscarVanL OscarVanL changed the title Add Mypy library stubs / typing Suggestion: Add Mypy library stubs / typing Oct 22, 2024
@cak
Copy link
Member

cak commented Oct 22, 2024

Thanks for the suggestion, Oscar! That’s an excellent point about Mypy. I’ll look into why Mypy is showing errors and work on a fix for the next release. Appreciate your contribution!

@cak cak added the enhancement New feature or request label Oct 22, 2024
@cak cak self-assigned this Oct 22, 2024
@cak cak added bug Something isn't working and removed enhancement New feature or request labels Oct 22, 2024
@cak
Copy link
Member

cak commented Oct 22, 2024

Also, @OscarVanL, could you please double-check that secure is installed correctly in your environment? According to the Mypy documentation (https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports), the ‘Cannot find implementation’ error could happen if the package isn’t installed or if the py.typed marker isn’t being detected. Let me know if that helps, and I’ll continue to investigate on my side as well!

@OscarVanL
Copy link
Author

Thanks, I did double-check this and the package is installed in the environment I run mypy. I have seen this same error message in the past when packages are untyped (or for whatever reason mypy can't use the typing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants