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 typing._Final #13015

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

add typing._Final #13015

wants to merge 1 commit into from

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Nov 14, 2024

This is the subset of typing module internal base class inheritance that's stable over all supported versions of python.

This probably isn't worth doing either. But like the maximalist version of this MR, I wanted to work out what it would look like, and once I did that I feel like it makes sense to push it up to generate a record of that and let other people see it too.

I know I've pushed up a bunch of MRs lately which are really scraping the bottom of the barrel, metaphorically speaking, in the name of accurate inheritance. So if it's not too weird, I wanted to say that I hope that it's not too much of a pain for the maintainers here for me to do that. I appreciate the work that you all do and I don't want to be making it harder for you.

This is the subset of typing module internal base classes
that are stable over all supported versions of python.
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
+ pydantic/v1/typing.py:41: error: Unused "type: ignore" comment  [unused-ignore]
- pydantic/_internal/_typing_extra.py:410: error: Module has no attribute "_Final"; maybe "Final"?  [attr-defined]

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.

1 participant