Skip to content

Commit

Permalink
pythongh-118418: Use a default value for type_params in `typing._ev…
Browse files Browse the repository at this point in the history
…al_type`
  • Loading branch information
sobolevn committed Apr 30, 2024
1 parent 11cbf77 commit d7483de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def inner(*args, **kwds):
return decorator


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

def _evaluate(self, globalns, localns, type_params, *, recursive_guard):
def _evaluate(self, globalns, localns, type_params=None, *, recursive_guard):
if self.__forward_arg__ in recursive_guard:
return self
if not self.__forward_evaluated__ or localns is not globalns:
Expand Down

0 comments on commit d7483de

Please sign in to comment.