bpo-40257: Tweak docstrings for special generic aliases. (GH-20022)
* Add the terminating period. * Omit module name for builtin types.
This commit is contained in:
parent
0122d48681
commit
2fbc57af85
|
@ -753,7 +753,10 @@ class _SpecialGenericAlias(_BaseGenericAlias, _root=True):
|
|||
name = origin.__name__
|
||||
super().__init__(origin, inst=inst, name=name)
|
||||
self._nparams = nparams
|
||||
self.__doc__ = f'A generic version of {origin.__module__}.{origin.__qualname__}'
|
||||
if origin.__module__ == 'builtins':
|
||||
self.__doc__ = f'A generic version of {origin.__qualname__}.'
|
||||
else:
|
||||
self.__doc__ = f'A generic version of {origin.__module__}.{origin.__qualname__}.'
|
||||
|
||||
@_tp_cache
|
||||
def __getitem__(self, params):
|
||||
|
|
Loading…
Reference in New Issue