[BE]: Enable ruff rule TC007 (#153394)

Enables [TC007] https://docs.astral.sh/ruff/rules/unquoted-type-alias/#unquoted-type-alias-tc007 this finds type aliases that should be quoted if they have to interact with IF TYPE_CHECKING blocks: https://docs.astral.sh/ruff/rules/unquoted-type-alias/#unquoted-type-alias-tc007

Disabled it when we updated RUFF, but really should only have disabled TC006 as that is the one that is going to cause some changes codebase wide.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153394
Approved by: https://github.com/albanD
This commit is contained in:
Aaron Gokaslan
2025-05-12 19:18:29 +00:00
committed by PyTorch MergeBot
parent fb85ebd710
commit 45df18dcd0

View File

@ -128,7 +128,6 @@ ignore = [
"SIM118",
"UP007", # keep-runtime-typing
"TC006",
"TC007",
]
select = [
"B",