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

PEP 749: Add conditional annotations and partially executed modules #4316

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Mar 21, 2025


📚 Documentation preview 📚: https://pep-previews--4316.org.readthedocs.build/

* The generated ``__annotate__`` function uses the set to determine
which annotations were defined in the class or module body, and return only those.

This was implemented in :gh:pr:`130935`.
Copy link
Member

Choose a reason for hiding this comment

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

We don't have a role like this, but we could add an extlint?

For example:

https://github.com/python-pillow/Pillow/blob/478ccb4e693b71b3a0f5a7c623e6bc310c07b8cd/docs/conf.py#L342

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I should have checked. I just went with @AA-Turner's suggestion for now (thanks!) but it might be nice to add what you suggest.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Adam Turner <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Adam Turner <[email protected]>
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.

None yet

3 participants