@@ -157,7 +157,7 @@ def __repr__(self):
157
157
158
158
def __getitem__ (self , parameters ):
159
159
item = typing ._type_check (parameters ,
160
- f'{ self ._name } accepts only single type' )
160
+ f'{ self ._name } accepts only a single type. ' )
161
161
return typing ._GenericAlias (self , (item ,))
162
162
163
163
Final = _FinalForm ('Final' ,
@@ -1336,7 +1336,7 @@ def is_str(val: Union[str, float]):
1336
1336
``TypeGuard`` also works with type variables. For more information, see
1337
1337
PEP 647 (User-Defined Type Guards).
1338
1338
"""
1339
- item = typing ._type_check (parameters , f'{ self } accepts only single type.' )
1339
+ item = typing ._type_check (parameters , f'{ self } accepts only a single type.' )
1340
1340
return typing ._GenericAlias (self , (item ,))
1341
1341
# 3.7-3.8
1342
1342
else :
@@ -1539,7 +1539,7 @@ class Movie(TypedDict, total=False):
1539
1539
There is no runtime checking that a required key is actually provided
1540
1540
when instantiating a related TypedDict.
1541
1541
"""
1542
- item = typing ._type_check (parameters , f'{ self ._name } accepts only single type' )
1542
+ item = typing ._type_check (parameters , f'{ self ._name } accepts only a single type. ' )
1543
1543
return typing ._GenericAlias (self , (item ,))
1544
1544
1545
1545
@_ExtensionsSpecialForm
@@ -1556,7 +1556,7 @@ class Movie(TypedDict):
1556
1556
year=1999,
1557
1557
)
1558
1558
"""
1559
- item = typing ._type_check (parameters , f'{ self ._name } accepts only single type' )
1559
+ item = typing ._type_check (parameters , f'{ self ._name } accepts only a single type. ' )
1560
1560
return typing ._GenericAlias (self , (item ,))
1561
1561
1562
1562
else :
@@ -1566,7 +1566,7 @@ def __repr__(self):
1566
1566
1567
1567
def __getitem__ (self , parameters ):
1568
1568
item = typing ._type_check (parameters ,
1569
- '{ } accepts only single type' . format ( self . _name ) )
1569
+ f' { self . _name } accepts only a single type.' )
1570
1570
return typing ._GenericAlias (self , (item ,))
1571
1571
1572
1572
Required = _RequiredForm (
@@ -1622,7 +1622,7 @@ def add_batch_axis(
1622
1622
) -> Array[Batch, Unpack[Shape]]: ...
1623
1623
1624
1624
"""
1625
- item = typing ._type_check (parameters , f'{ self ._name } accepts only single type' )
1625
+ item = typing ._type_check (parameters , f'{ self ._name } accepts only a single type. ' )
1626
1626
return _UnpackAlias (self , (item ,))
1627
1627
1628
1628
def _is_unpack (obj ):
@@ -1638,7 +1638,7 @@ def __repr__(self):
1638
1638
1639
1639
def __getitem__ (self , parameters ):
1640
1640
item = typing ._type_check (parameters ,
1641
- f'{ self ._name } accepts only single type' )
1641
+ f'{ self ._name } accepts only a single type. ' )
1642
1642
return _UnpackAlias (self , (item ,))
1643
1643
1644
1644
Unpack = _UnpackForm (
0 commit comments