Skip to content

Convert _typeshed.Self usages to typing_extensions.Self (PEP 673) #441

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

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Jun 27, 2023

typing_extensions.Self is easier to use, since it no longer requires hinting the self or cls parameter, the self type is inferred automatically. Docs: https://peps.python.org/pep-0673/

Using Ruff flake8-tidy-imports to disallow reintroducing this import in the future.

Related issues

Similar to typeddjango/django-stubs#1591

intgr and others added 2 commits June 27, 2023 22:41
`typing_extensions.Self` is easier to use, since it no longer requires hinting the `self` or `cls` parameter, the self type is inferred automatically. Docs: https://peps.python.org/pep-0673/

Using Ruff `flake8-tidy-imports` to disallow reintroducing this import in the future.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

👍

@sobolevn sobolevn merged commit 6d34bb1 into typeddjango:master Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants