diff options
Diffstat (limited to 'sphinx/util/typing.py')
-rw-r--r-- | sphinx/util/typing.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index af6edcae0..279268aee 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -226,13 +226,13 @@ def _restify_py36(cls: Optional[Type]) -> str: else: reftext = ':class:`%s`' % qualname - if cls.__args__ is None or len(cls.__args__) <= 2: # type: ignore # NOQA - params = cls.__args__ # type: ignore - elif cls.__origin__ == Generator: # type: ignore - params = cls.__args__ # type: ignore + if cls.__args__ is None or len(cls.__args__) <= 2: + params = cls.__args__ + elif cls.__origin__ == Generator: + params = cls.__args__ else: # typing.Callable - args = ', '.join(restify(arg) for arg in cls.__args__[:-1]) # type: ignore - result = restify(cls.__args__[-1]) # type: ignore + args = ', '.join(restify(arg) for arg in cls.__args__[:-1]) + result = restify(cls.__args__[-1]) return reftext + '\\ [[%s], %s]' % (args, result) if params: |