Skip to content

Commit e1ba535

Browse files
committed
fix
1 parent 1b8c295 commit e1ba535

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

azure/functions/meta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222

2323

2424
def is_iterable_type_annotation(annotation: object, pytype: object) -> bool:
25+
origin = get_origin(annotation)
2526
if sys.version_info >= (3, 9):
2627
# Since python 3.9, standard collection types
2728
# are supported in type hint
28-
origin = get_origin(annotation)
2929
is_iterable_anno = (origin is not None
3030
and issubclass(origin, collections.abc.Iterable))
3131
else:
3232
is_iterable_anno = (
3333
typing_inspect.is_generic_type(annotation)
34-
and issubclass(get_origin(annotation),
35-
collections.abc.Iterable)
34+
and origin is not None
35+
and issubclass(origin, collections.abc.Iterable)
3636
)
3737

3838
if not is_iterable_anno:

0 commit comments

Comments
 (0)