[Python-checkins] Fix unused classes in a typing test (GH-102437)

miss-islington webhook-mailer at python.org
Sun Mar 5 10:07:51 EST 2023


https://github.com/python/cpython/commit/7894bbe94ba319eb650f383cb5196424c77b2cfd
commit: 7894bbe94ba319eb650f383cb5196424c77b2cfd
branch: main
author: JosephSBoyle <48555120+JosephSBoyle at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-03-05T07:07:44-08:00
summary:

Fix unused classes in a typing test (GH-102437)



As part of investigation issue https://github.com/python/cpython/issues/102433, I discovered what I believe to be an error where two classes `CI` and `DI` are not being used. The assertions beneath them act on `C` and `D`, duplicating existing assertions in this test.

Automerge-Triggered-By: GH:AlexWaygood

files:
M Lib/test/test_typing.py

diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 96496ec9279e..2eeaf91d78d8 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -2921,8 +2921,8 @@ class DI:
             def __init__(self):
                 self.x = None
 
-        self.assertIsInstance(C(), P)
-        self.assertIsInstance(D(), P)
+        self.assertIsInstance(CI(), P)
+        self.assertIsInstance(DI(), P)
 
     def test_protocols_in_unions(self):
         class P(Protocol):



More information about the Python-checkins mailing list