[Python-checkins] [3.11] gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (GH-104335) (#104338)

AlexWaygood webhook-mailer at python.org
Tue May 9 15:43:05 EDT 2023


https://github.com/python/cpython/commit/663b32199e709a83b2eebc3eeeb602f0af949bee
commit: 663b32199e709a83b2eebc3eeeb602f0af949bee
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-05-09T19:42:57Z
summary:

[3.11] gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (GH-104335) (#104338)

gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (GH-104335)
(cherry picked from commit 01c321ca34d99f35f174768c6f8c500801d4ef4c)

Co-authored-by: Kirill Podoprigora <kirill.bast9 at mail.ru>

files:
M Lib/typing.py

diff --git a/Lib/typing.py b/Lib/typing.py
index 2db354017a8b..921542f49c32 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1860,7 +1860,7 @@ def __init_subclass__(cls, *args, **kwargs):
                         base.__origin__ is Generic):
                     if gvars is not None:
                         raise TypeError(
-                            "Cannot inherit from Generic[...] multiple types.")
+                            "Cannot inherit from Generic[...] multiple times.")
                     gvars = base.__parameters__
             if gvars is not None:
                 tvarset = set(tvars)



More information about the Python-checkins mailing list