Skip to content

Commit 699bbbc

Browse files
committed
refactor build_binding_protos into dict comprehension
1 parent 8a13fa9 commit 699bbbc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

azure_functions_worker/loader.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ def uninstall() -> None:
4848

4949

5050
def build_binding_protos(indexed_function: List[Function]) -> Dict:
51-
binding_protos = {}
52-
for binding in indexed_function.get_bindings():
53-
binding_protos[binding.name] = protos.BindingInfo(
51+
return {
52+
binding.name: protos.BindingInfo(
5453
type=binding.type,
5554
data_type=binding.data_type,
5655
direction=binding.direction)
57-
58-
return binding_protos
56+
for binding in indexed_function.get_bindings()
57+
}
5958

6059

6160
def process_indexed_function(functions_registry: functions.Registry,

0 commit comments

Comments
 (0)