Skip to content

Commit

Permalink
Lib/typing.py copy edits originating from GH-31061 (GH-31684)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2031149)

Co-authored-by: Matt Bogosian <eb3f73+github+com@yaymail.com>
  • Loading branch information
miss-islington and posita committed Mar 5, 2022
1 parent fa69ec8 commit 4716f70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def inner(*args, **kwds):
def _eval_type(t, globalns, localns, 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().
recursive_guard is used to prevent prevent infinite recursion
with recursive ForwardRef.
recursive_guard is used to prevent infinite recursion with a recursive
ForwardRef.
"""
if isinstance(t, ForwardRef):
return t._evaluate(globalns, localns, recursive_guard)
Expand Down Expand Up @@ -976,7 +976,7 @@ def __getattr__(self, attr):
return self._name or self.__origin__.__name__

# We are careful for copy and pickle.
# Also for simplicity we just don't relay all dunder names
# Also for simplicity we don't relay any dunder names
if '__origin__' in self.__dict__ and not _is_dunder(attr):
return getattr(self.__origin__, attr)
raise AttributeError(attr)
Expand Down

0 comments on commit 4716f70

Please sign in to comment.