File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -5084,10 +5084,6 @@ def test_inline_empty(self):
50845084 TD = TypedDict [{}]
50855085 self .assertEqual (TD .__required_keys__ , set ())
50865086
5087- def test_inline_argument_as_tuple (self ):
5088- TD = TypedDict [({},)]
5089- self .assertEqual (TD .__required_keys__ , set ())
5090-
50915087 def test_inline (self ):
50925088 TD = TypedDict [{
50935089 "a" : int ,
Original file line number Diff line number Diff line change @@ -1206,16 +1206,14 @@ class Point2D(TypedDict):
12061206 See PEP 655 for more details on Required and NotRequired.
12071207 """
12081208 # This runs when creating inline TypedDicts:
1209- if not isinstance (args , tuple ):
1210- args = (args ,)
1211- if len (args ) != 1 or not isinstance (args [0 ], dict ):
1209+ if not isinstance (args , dict ):
12121210 raise TypeError (
12131211 "TypedDict[...] should be used with a single dict argument"
12141212 )
12151213
12161214 return _create_typeddict (
12171215 "<inline TypedDict>" ,
1218- args [ 0 ] ,
1216+ args ,
12191217 typing_is_inline = True ,
12201218 total = True ,
12211219 closed = None ,
You can’t perform that action at this time.
0 commit comments