@@ -267,7 +267,7 @@ def _restify_py36(cls: Optional[Type], mode: str = 'fully-qualified-except-typin
267267 return reftext + '\\ [%s]' % param_str
268268 else :
269269 return reftext
270- elif isinstance (cls , typing .GenericMeta ):
270+ elif isinstance (cls , typing .GenericMeta ): # type: ignore[attr-defined]
271271 if module == 'typing' :
272272 reftext = ':py:class:`~typing.%s`' % qualname
273273 else :
@@ -505,16 +505,16 @@ def _stringify_py36(annotation: Any, mode: str = 'fully-qualified-except-typing'
505505 return '%s%s[%s]' % (modprefix , qualname , param_str )
506506 else :
507507 return modprefix + qualname
508- elif isinstance (annotation , typing .GenericMeta ):
508+ elif isinstance (annotation , typing .GenericMeta ): # type: ignore[attr-defined]
509509 params = None
510- if annotation .__args__ is None or len (annotation .__args__ ) <= 2 : # type: ignore # NOQA
511- params = annotation .__args__ # type: ignore
512- elif annotation .__origin__ == Generator : # type: ignore
513- params = annotation .__args__ # type: ignore
510+ if annotation .__args__ is None or len (annotation .__args__ ) <= 2 : # NOQA
511+ params = annotation .__args__
512+ elif annotation .__origin__ == Generator :
513+ params = annotation .__args__
514514 else : # typing.Callable
515515 args = ', ' .join (stringify (arg , mode ) for arg
516- in annotation .__args__ [:- 1 ]) # type: ignore
517- result = stringify (annotation .__args__ [- 1 ]) # type: ignore
516+ in annotation .__args__ [:- 1 ])
517+ result = stringify (annotation .__args__ [- 1 ])
518518 return '%s%s[[%s], %s]' % (modprefix , qualname , args , result )
519519 if params is not None :
520520 param_str = ', ' .join (stringify (p , mode ) for p in params )
0 commit comments