Skip to content

Commit 46eb74e

Browse files
author
Evan Roman
committed
Lint
1 parent 1a2910b commit 46eb74e

File tree

2 files changed

+7
-7
lines changed
  • azurefunctions-extensions-base/azurefunctions/extensions/base
  • azurefunctions-extensions-bindings-eventhub/azurefunctions/extensions/bindings/eventhub

2 files changed

+7
-7
lines changed

azurefunctions-extensions-base/azurefunctions/extensions/base/meta.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,17 @@ def check_supported_type(cls, subclass: type) -> bool:
9898
@classmethod
9999
def __is_iterable_subclass(cls, annotation: type) -> bool:
100100
origin = get_origin(annotation)
101-
if (not inspect.isclass(origin) or
102-
not issubclass(origin, collections.abc.Iterable)):
101+
if (origin is None
102+
or not issubclass(origin, collections.abc.Iterable)):
103103
return False
104104

105105
# Extract inner type(s) from iterable
106106
args = get_args(annotation)
107107
if not args:
108108
return False
109109

110-
return any(isinstance(arg, type)
110+
return any(
111+
isinstance(arg, type)
111112
and issubclass(arg, sdkType.SdkType) for arg in args)
112113

113114
def has_trigger_support(cls) -> bool:
@@ -128,8 +129,8 @@ def _decode_typed_data(
128129
return None
129130

130131
data_type = data.type
131-
if (data_type == "model_binding_data" or
132-
data_type == "collection_model_binding_data"):
132+
if (data_type == "model_binding_data"
133+
or data_type == "collection_model_binding_data"):
133134
result = data.value
134135
elif data_type is None:
135136
return None

azurefunctions-extensions-bindings-eventhub/azurefunctions/extensions/bindings/eventhub/eventDataConverter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class EventDataConverter(
1818
@classmethod
1919
def check_input_type_annotation(cls, pytype: type) -> bool:
2020
origin = get_origin(pytype)
21-
if (not inspect.isclass(origin) or
22-
not issubclass(get_origin(pytype), collections.abc.Iterable)):
21+
if origin is None or not issubclass(origin, collections.abc.Iterable):
2322
return issubclass(pytype, EventData)
2423

2524
# Extract inner type(s) from iterable

0 commit comments

Comments
 (0)