Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions typing_extensions/src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def __repr__(self):

def __getitem__(self, parameters):
item = typing._type_check(parameters,
f'{self._name} accepts only single type')
f'{self._name} accepts only a single type.')
return typing._GenericAlias(self, (item,))

Final = _FinalForm('Final',
Expand Down Expand Up @@ -1336,7 +1336,7 @@ def is_str(val: Union[str, float]):
``TypeGuard`` also works with type variables. For more information, see
PEP 647 (User-Defined Type Guards).
"""
item = typing._type_check(parameters, f'{self} accepts only single type.')
item = typing._type_check(parameters, f'{self} accepts only a single type.')
return typing._GenericAlias(self, (item,))
# 3.7-3.8
else:
Expand Down Expand Up @@ -1539,7 +1539,7 @@ class Movie(TypedDict, total=False):
There is no runtime checking that a required key is actually provided
when instantiating a related TypedDict.
"""
item = typing._type_check(parameters, f'{self._name} accepts only single type')
item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
return typing._GenericAlias(self, (item,))

@_ExtensionsSpecialForm
Expand All @@ -1556,7 +1556,7 @@ class Movie(TypedDict):
year=1999,
)
"""
item = typing._type_check(parameters, f'{self._name} accepts only single type')
item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
return typing._GenericAlias(self, (item,))

else:
Expand All @@ -1566,7 +1566,7 @@ def __repr__(self):

def __getitem__(self, parameters):
item = typing._type_check(parameters,
'{} accepts only single type'.format(self._name))
f'{self._name} accepts only a single type.')
return typing._GenericAlias(self, (item,))

Required = _RequiredForm(
Expand Down Expand Up @@ -1622,7 +1622,7 @@ def add_batch_axis(
) -> Array[Batch, Unpack[Shape]]: ...

"""
item = typing._type_check(parameters, f'{self._name} accepts only single type')
item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
return _UnpackAlias(self, (item,))

def _is_unpack(obj):
Expand All @@ -1638,7 +1638,7 @@ def __repr__(self):

def __getitem__(self, parameters):
item = typing._type_check(parameters,
f'{self._name} accepts only single type')
f'{self._name} accepts only a single type.')
return _UnpackAlias(self, (item,))

Unpack = _UnpackForm(
Expand Down