Skip to content

Conversation

@MeGaGiGaGon
Copy link
Contributor

Summary

Part of #18972

This PR makes non-pep695-generic-class (UP046)'s example error out-of-the-box.

Old example

from typing import TypeVar

T = TypeVar("T")


class GenericClass(Generic[T]):
    var: T

New example

from typing import Generic, TypeVar

T = TypeVar("T")


class GenericClass(Generic[T]):
    var: T

Test Plan

N/A, no functionality/tests affected

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Jul 12, 2025
@AlexWaygood AlexWaygood merged commit 4bc2713 into astral-sh:main Jul 12, 2025
36 checks passed
@MeGaGiGaGon MeGaGiGaGon deleted the patch-3 branch July 12, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants