Skip to content

Commit 54bd579

Browse files
committed
flake8
1 parent 0883bb8 commit 54bd579

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

azure_functions_worker/bindings/meta.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@
1515
PB_TYPE_RPC_SHARED_MEMORY = 'rpc_shared_memory'
1616
BINDING_REGISTRY = None
1717

18+
1819
def _check_http_input_type_annotation(bind_name: str, pytype: type) -> bool:
1920
ext_base = sys.modules.get('azure.functions.extension.base')
2021
if ext_base is not None and ext_base.HttpV2FeatureChecker.http_v2_enabled():
2122
return ext_base.RequestTrackerMeta.check_type(pytype)
22-
23+
2324
binding = get_binding(bind_name)
2425
return binding.check_input_type_annotation(pytype)
2526

27+
2628
def _check_http_output_type_annotation(bind_name: str, pytype: type) -> bool:
2729
ext_base = sys.modules.get('azure.functions.extension.base')
2830
if ext_base is not None and ext_base.HttpV2FeatureChecker.http_v2_enabled():
2931
return ext_base.ResponseTrackerMeta.check_type(pytype)
30-
32+
3133
binding = get_binding(bind_name)
3234
return binding.check_output_type_annotation(pytype)
3335

@@ -40,6 +42,7 @@ def _check_http_output_type_annotation(bind_name: str, pytype: type) -> bool:
4042
HTTP: _check_http_output_type_annotation
4143
}
4244

45+
4346
def load_binding_registry() -> None:
4447
func = sys.modules.get('azure.functions')
4548

@@ -71,15 +74,16 @@ def check_input_type_annotation(bind_name: str, pytype: type) -> bool:
7174
global INPUT_TYPE_CHECK_OVERRIDE_MAP
7275
if bind_name in INPUT_TYPE_CHECK_OVERRIDE_MAP:
7376
return INPUT_TYPE_CHECK_OVERRIDE_MAP[bind_name](bind_name, pytype)
74-
77+
7578
binding = get_binding(bind_name)
7679
return binding.check_input_type_annotation(pytype)
7780

81+
7882
def check_output_type_annotation(bind_name: str, pytype: type) -> bool:
7983
global OUTPUT_TYPE_CHECK_OVERRIDE_MAP
8084
if bind_name in OUTPUT_TYPE_CHECK_OVERRIDE_MAP:
8185
return OUTPUT_TYPE_CHECK_OVERRIDE_MAP[bind_name](bind_name, pytype)
82-
86+
8387
binding = get_binding(bind_name)
8488
return binding.check_output_type_annotation(pytype)
8589

azure_functions_worker/functions.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class FunctionInfo(typing.NamedTuple):
3535

3636
trigger_metadata: typing.Optional[typing.Dict[str, typing.Any]]
3737

38+
3839
class FunctionLoadError(RuntimeError):
3940

4041
def __init__(self, function_name: str, msg: str) -> None:
@@ -301,7 +302,8 @@ def add_func_to_registry_and_return_funcinfo(self, function,
301302
return_type: str):
302303

303304
http_trigger_param_name = next(
304-
(input_type for input_type, type_info in input_types.items() if type_info.binding_name == HTTP_TRIGGER),
305+
(input_type for input_type, type_info in input_types.items()
306+
if type_info.binding_name == HTTP_TRIGGER),
305307
None
306308
)
307309

@@ -323,7 +325,6 @@ def add_func_to_registry_and_return_funcinfo(self, function,
323325
output_types=output_types,
324326
return_type=return_type,
325327
trigger_metadata=trigger_metadata)
326-
327328

328329
self._functions[function_id] = function_info
329330
return function_info

azure_functions_worker/logging.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
handler: Optional[logging.Handler] = None
2222
error_handler: Optional[logging.Handler] = None
2323

24+
2425
def format_exception(exception: Exception) -> str:
2526
msg = str(exception) + "\n"
2627
if (sys.version_info.major, sys.version_info.minor) < (3, 10):

0 commit comments

Comments
 (0)