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 00e8ee7 commit 0c9ef48Copy full SHA for 0c9ef48
src/test_typing_extensions.py
@@ -4159,6 +4159,22 @@ class TD2(TD1):
4159
4160
self.assertIs(TD2.__total__, True)
4161
4162
+ def test_total_with_assigned_value(self):
4163
+ class TD(TypedDict):
4164
+ __total__ = "some_value"
4165
+
4166
+ self.assertIs(TD.__total__, True)
4167
4168
+ class TD2(TypedDict, total=True):
4169
4170
4171
+ self.assertIs(TD2.__total__, True)
4172
4173
+ class TD3(TypedDict, total=False):
4174
+ __total__ = "some value"
4175
4176
+ self.assertIs(TD3.__total__, False)
4177
4178
def test_optional_keys(self):
4179
class Point2Dor3D(Point2D, total=False):
4180
z: int
0 commit comments