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

Add pyi type hints for Macaroon, Caveat #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

redmer
Copy link

@redmer redmer commented Feb 21, 2024

Hey, I've added some initial type hints for the Macaroon and Caveat classes. I've tested them locally and these improve autocomplete hints as per the VS Code screenshots below.
image

They even combine the docstrings with the .pyi typehints.
image

I've also added some references to these type stubs in the setup files, per https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages, but I'm quite unsure how to test that even locally. I wasn't sure how to make type hint tests that don't hinder this package's compatibility matrix.

Copy link

@lengau lengau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this!

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

Successfully merging this pull request may close these issues.

2 participants