Skip to content

Commit d6694e3

Browse files
committed
fix ruff
1 parent d5f23fe commit d6694e3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ ignore = [
9494
"RUF012",
9595
"RUF022",
9696
"RUF023",
97+
# Ruff doesn't understand the globals() assignment; we test __all__
98+
# directly in test_all_names_in___all__.
99+
"F822",
97100
]
98101

99102
[tool.ruff.lint.per-file-ignores]

src/typing_extensions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4227,16 +4227,13 @@ def evaluate_forward_ref(
42274227
# future versions of Python that may remove these names.
42284228
_typing_names = [
42294229
"AbstractSet",
4230-
"Annotated",
42314230
"AnyStr",
42324231
"BinaryIO",
42334232
"Callable",
42344233
"Collection",
42354234
"Container",
42364235
"Dict",
4237-
"ForwardRef",
42384236
"FrozenSet",
4239-
"Generic",
42404237
"Hashable",
42414238
"IO",
42424239
"ItemsView",
@@ -4271,3 +4268,8 @@ def evaluate_forward_ref(
42714268
if hasattr(typing, _name):
42724269
globals()[_name] = getattr(typing, _name)
42734270
del _name
4271+
# These are defined unconditionally because they are used in
4272+
# typing-extensions itself.
4273+
Generic = typing.Generic
4274+
ForwardRef = typing.ForwardRef
4275+
Annotated = typing.Annotated

0 commit comments

Comments
 (0)