We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e87e79d commit e2abebfCopy full SHA for e2abebf
1 file changed
src/test_typing_extensions.py
@@ -4248,6 +4248,22 @@ class TD2(TD1):
4248
4249
self.assertIs(TD2.__total__, True)
4250
4251
+ def test_total_with_assigned_value(self):
4252
+ class TD(TypedDict):
4253
+ __total__ = "some_value"
4254
+
4255
+ self.assertIs(TD.__total__, True)
4256
4257
+ class TD2(TypedDict, total=True):
4258
4259
4260
+ self.assertIs(TD2.__total__, True)
4261
4262
+ class TD3(TypedDict, total=False):
4263
+ __total__ = "some value"
4264
4265
+ self.assertIs(TD3.__total__, False)
4266
4267
def test_optional_keys(self):
4268
class Point2Dor3D(Point2D, total=False):
4269
z: int
0 commit comments