]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Lib/typing.py copy edits originating from GH-31061 (#31684)
authorMatt Bogosian <eb3f73+github+com@yaymail.com>
Sat, 5 Mar 2022 02:51:55 +0000 (20:51 -0600)
committerGitHub <noreply@github.com>
Sat, 5 Mar 2022 02:51:55 +0000 (10:51 +0800)
Lib/typing.py

index 6e0c68c842420b0a2d186fbab2ecd1c9e672489c..27d83c5105fa48947e5a393fca8e8d83b1fdd01f 100644 (file)
@@ -330,8 +330,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)
@@ -1036,7 +1036,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)