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

python-cloudflare is not PEP-561 aware #174

Open
chris-zenfolio opened this issue Oct 30, 2023 · 2 comments
Open

python-cloudflare is not PEP-561 aware #174

chris-zenfolio opened this issue Oct 30, 2023 · 2 comments

Comments

@chris-zenfolio
Copy link

I am writing Python code for some automation I am creating, but when testing my code with mypy, I always get the following error:

error: Skipping analyzing "CloudFlare": module is installed, but missing library stubs or py.typed marker  [import-untyped]

This error is generated when mypy hits the following line:

import Cloudflare

Please make python-cloudflare PEP-561 aware.
Here is a link to the mypy docs relevant to this error.

@mahtin
Copy link
Collaborator

mahtin commented Oct 30, 2023

Thanks for pointer to PEP-561. Looks like a useful thing. Feel free to PR the required changes or wait for me to free-up some time.

@chris-zenfolio
Copy link
Author

@mahtin : I looked at what it would take, but I don't understand the code well enough to create a PR for this. I spent over an hour last night trying to figure out what data type would be returned from a single call to get a Zone and then Python threw up all over me because my type hints in my functions were never right. I think it has to do with how API calls are wrapped? (eg cloudflare.zones.dns_records.post())

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

2 participants