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

Rename _InstallerTypeT and mark type aliases with TypeAlias #4436

Merged
merged 7 commits into from
Aug 8, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Jun 26, 2024

Summary of changes

Noticed in python/typeshed#12215
According to https://github.com/PyCQA/flake8-pyi/blob/main/ERRORCODES.md#Y043 , that was a bad name to have as it implies a TypeVar. I've renamed the alias to a more fitting _StrictInstallerType (alternatively: _GenericInstallerType)

This would've been caught by https://docs.astral.sh/ruff/rules/t-suffixed-type-alias/ if it was explicitly marked as a type alias.

Explicitly marked all type aliases I could easily find with TypeAlias (available in Python 3.10, backported to typing_extensions).

Pull Request Checklist

  • Changes have tests (existing Ruff and type-checking tests)
  • News fragment added in newsfragments/. (not user facing)
    (See documentation for details)

@Avasam Avasam changed the title Rename _InstallerTypeT Rename _InstallerTypeT and mark type aliases with TypeAlias Jun 26, 2024
@abravalheri abravalheri merged commit d13f9c5 into pypa:main Aug 8, 2024
18 of 19 checks passed
@abravalheri
Copy link
Contributor

Thank you!

@Avasam Avasam deleted the Rename-_InstallerTypeT branch August 8, 2024 16:04
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