Skip to content

Commit 8885c3c

Browse files
feat: formatting done
1 parent d045521 commit 8885c3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

smartcar/vehicle.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ def batch(self, paths: List[str]) -> namedtuple:
443443
"sc-request-id"
444444
)
445445
# use lambda default args to avoid issues with closures
446-
batch_dict[
447-
attribute
448-
] = lambda p=path, r=res_dict: types.select_named_tuple(p, r)
446+
batch_dict[attribute] = (
447+
lambda p=path, r=res_dict: types.select_named_tuple(p, r)
448+
)
449449
else:
450450
# if individual response is erroneous, attach a lambda that returns a SmartcarException
451451
def _attribute_raise_exception(smartcar_exception):
@@ -455,9 +455,9 @@ def _attribute_raise_exception(smartcar_exception):
455455
headers = response.headers
456456
body = json.dumps(res_dict.get("body"))
457457
sc_exception = sce.exception_factory(code, headers, body)
458-
batch_dict[
459-
attribute
460-
] = lambda e=sc_exception: _attribute_raise_exception(e)
458+
batch_dict[attribute] = (
459+
lambda e=sc_exception: _attribute_raise_exception(e)
460+
)
461461

462462
# STEP 3 - Attach Meta to batch_dict
463463
batch_dict["meta"] = types.build_meta(response.headers)

0 commit comments

Comments
 (0)