Skip to content

Commit 7c0dd99

Browse files
committed
inline
1 parent 8d9d071 commit 7c0dd99

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

Lib/typing.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,11 @@ def _deduplicate(params, *, unhashable_fallback=False):
354354
if not unhashable_fallback:
355355
raise
356356
# Happens for cases like `Annotated[dict, {'x': IntValidator()}]`
357-
return _deduplicate_unhashable(params)
358-
359-
def _deduplicate_unhashable(unhashable_params):
360-
new_unhashable = []
361-
for t in unhashable_params:
362-
if t not in new_unhashable:
363-
new_unhashable.append(t)
364-
return new_unhashable
357+
new_unhashable = []
358+
for t in params:
359+
if t not in new_unhashable:
360+
new_unhashable.append(t)
361+
return new_unhashable
365362

366363
def _flatten_literal_params(parameters):
367364
"""Internal helper for Literal creation: flatten Literals among parameters."""

0 commit comments

Comments
 (0)