Skip to content

Commit 4a5ad84

Browse files
authored
gh-118418: Use a default value for type_params in typing._eval_type (#118431)
1 parent 72dae53 commit 4a5ad84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/typing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def inner(*args, **kwds):
400400
return decorator
401401

402402

403-
def _eval_type(t, globalns, localns, type_params, *, recursive_guard=frozenset()):
403+
def _eval_type(t, globalns, localns, type_params=None, *, recursive_guard=frozenset()):
404404
"""Evaluate all forward references in the given type t.
405405
406406
For use of globalns and localns see the docstring for get_type_hints().
@@ -981,7 +981,7 @@ def __init__(self, arg, is_argument=True, module=None, *, is_class=False):
981981
self.__forward_is_class__ = is_class
982982
self.__forward_module__ = module
983983

984-
def _evaluate(self, globalns, localns, type_params, *, recursive_guard):
984+
def _evaluate(self, globalns, localns, type_params=None, *, recursive_guard):
985985
if self.__forward_arg__ in recursive_guard:
986986
return self
987987
if not self.__forward_evaluated__ or localns is not globalns:

0 commit comments

Comments
 (0)