Skip to content

Commit 54b8eb0

Browse files
committed
Corrected and clarified case
1 parent 1761a43 commit 54b8eb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/typing_extensions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,8 @@ def _clean_optional(obj, hints, globalns=None, localns=None):
12821282
):
12831283
continue
12841284
original_value = original_hints[name]
1285-
if original_value is None: # should be NoneType already; check just in case
1285+
# value=NoneType should have caused a skip above but check for safety
1286+
if original_value is None:
12861287
original_value = _NoneType
12871288
# Forward reference
12881289
if isinstance(original_value, str):

0 commit comments

Comments
 (0)