Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ae16ea

Browse files
Apply suggestions from code review
Co-authored-by: Alex Waygood <[email protected]>
1 parent 689267a commit 1ae16ea

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Lib/test/test_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ class G(typing.NamedTuple):
13831383

13841384
self.assertIs(types.get_original_bases(G)[0], typing.NamedTuple)
13851385

1386-
with self.assertRaises(TypeError):
1386+
with self.assertRaisesRegex(TypeError, "Expected an instance of type"):
13871387
types.get_original_bases(object())
13881388

13891389
# Many of the following tests are derived from test_descr.py

Lib/types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ def _calculate_meta(meta, bases):
147147
def get_original_bases(cls, /):
148148
"""Return the class's "original" bases prior to modification by `__mro_entries__`.
149149
150-
This is useful for introspecting Generics.
151-
152150
Examples::
153151
154152
from typing import TypeVar, Generic

0 commit comments

Comments
 (0)