Skip to content

UP019 should detect typing_extensions.Text #20819

@dscorbett

Description

@dscorbett

Summary

typing-text-str-alias (UP019) detects typing.Text. It would also be useful for it to detect typing_extensions.Text. Example:

$ cat >up019.py <<'# EOF'
from typing_extensions import Text
foo: Text = "bar"
# EOF

$ ruff --isolated check up019.py --select UP019
All checks passed!

Version

ruff 0.14.0 (beea8cd 2025-10-07)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions