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

Use Self type from PEP 673 everywhere #183

Merged
merged 3 commits into from
Aug 26, 2023
Merged

Conversation

hamdanal
Copy link

This PR makes consistent use of the Self type. It also removes version checks for from typing_extensions Self and others as typing_extentions is considered a builtin module in stubs by all major type checkers (see typeshed). I added an isort option to reflect that fact similar to what is done in the typeshed project.

Copy link
Owner

@sbdchd sbdchd left a comment

Choose a reason for hiding this comment

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

Thanks!!

@kodiakhq kodiakhq bot merged commit 7c19828 into sbdchd:main Aug 26, 2023
2 checks passed
@hamdanal
Copy link
Author

Thank you @sbdchd . Would you be open to a PR updating this project to use PEP-585 (list instead of typing.List and the like) and another to use PEP-604 (A | B instead of typing.Union[A, B]? I think the new syntax is more readable and easier to maintain.
I can also add a linter that keeps these up-to-date with auto-formatting. All of this is already done over at the typeshed project.

@hamdanal hamdanal deleted the selftype branch August 26, 2023 21:50
@sbdchd
Copy link
Owner

sbdchd commented Aug 27, 2023

yeah that make sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants