File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 22
22
23
23
24
24
def is_iterable_type_annotation (annotation : object , pytype : object ) -> bool :
25
- is_iterable_anno = typing_inspect .is_generic_type (annotation ) and issubclass (get_origin (annotation ), collections .abc .Iterable )
25
+ is_iterable_anno = (
26
+ typing_inspect .is_generic_type (annotation )
27
+ and issubclass (typing_inspect .get_origin (annotation ),
28
+ collections .abc .Iterable )
29
+ )
26
30
27
31
if sys .version_info >= (3 , 9 ):
28
32
# After python 3.9, standard collection types are supported in type hint
29
33
origin = get_origin (annotation )
30
- is_iterable_anno = origin is not None and issubclass (origin , collections .abc .Iterable )
34
+ is_iterable_anno = (origin is not None
35
+ and issubclass (origin , collections .abc .Iterable ))
31
36
32
37
if not is_iterable_anno :
33
38
return False
You can’t perform that action at this time.
0 commit comments