From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 5 Mar 2022 03:17:32 +0000 (-0800) Subject: Lib/typing.py copy edits originating from GH-31061 (GH-31684) X-Git-Tag: v3.10.3~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4716f70c8543d12d18c64677af650d479b99edac;p=thirdparty%2FPython%2Fcpython.git Lib/typing.py copy edits originating from GH-31061 (GH-31684) (cherry picked from commit 2031149b9a7dfab5f5bad63f417e19f4fc2b9661) Co-authored-by: Matt Bogosian --- diff --git a/Lib/typing.py b/Lib/typing.py index 4519cdbc951c..da393eefc53a 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -320,8 +320,8 @@ def _tp_cache(func=None, /, *, typed=False): 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) @@ -976,7 +976,7 @@ class _BaseGenericAlias(_Final, _root=True): 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)