We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8184ac6 commit 0527f1dCopy full SHA for 0527f1d
src/test_typing_extensions.py
@@ -4148,6 +4148,17 @@ def test_total(self):
4148
self.assertEqual(Options.__required_keys__, frozenset())
4149
self.assertEqual(Options.__optional_keys__, {'log_level', 'log_path'})
4150
4151
+ def test_total_inherits_non_total(self):
4152
+ class TD1(TypedDict, total=False):
4153
+ a: int
4154
+
4155
+ self.assertIs(TD1.__total__, False)
4156
4157
+ class TD2(TD1):
4158
+ b: str
4159
4160
+ self.assertIs(TD2.__total__, True)
4161
4162
def test_optional_keys(self):
4163
class Point2Dor3D(Point2D, total=False):
4164
z: int
0 commit comments