Skip to content

Commit fe49c40

Browse files
committed
Removed Python 3.5 special cases
1 parent 6933aa5 commit fe49c40

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

sphinx_autodoc_typehints.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,6 @@ def get_annotation_args(annotation, module: str, class_name: str) -> Tuple:
7272
# Special cases
7373
if class_name in ('Pattern', 'Match') and hasattr(annotation, 'type_var'): # Python < 3.7
7474
return annotation.type_var,
75-
elif class_name == 'Callable' and hasattr(annotation, '__result__'): # Python < 3.5.3
76-
argtypes = (Ellipsis,) if annotation.__args__ is Ellipsis else annotation.__args__
77-
return argtypes + (annotation.__result__,)
78-
elif class_name == 'Union' and hasattr(annotation, '__union_params__'): # Union on Python 3.5
79-
return annotation.__union_params__
80-
elif class_name == 'Tuple' and hasattr(annotation, '__tuple_params__'): # Tuple on Python 3.5
81-
params = annotation.__tuple_params__
82-
if getattr(annotation, '__tuple_use_ellipsis__', False):
83-
params += (Ellipsis,)
84-
85-
return params
8675
elif class_name == 'ClassVar' and hasattr(annotation, '__type__'): # ClassVar on Python < 3.7
8776
return annotation.__type__,
8877
elif class_name == 'NewType' and hasattr(annotation, '__supertype__'):

0 commit comments

Comments
 (0)