From c02cca5ef3babb2ffa141b0ab7fcc4d38701144b Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Wed, 11 Sep 2024 08:18:06 +0300 Subject: [PATCH] Use list comprehension in parse_response Co-authored-by: Akseli Lukkarila --- custom_components/vinx/lw3.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/custom_components/vinx/lw3.py b/custom_components/vinx/lw3.py index 6fe2b02..379c589 100644 --- a/custom_components/vinx/lw3.py +++ b/custom_components/vinx/lw3.py @@ -83,12 +83,7 @@ def parse_single_line_response(response: str) -> SingleLineResponse: def parse_multiline_response(lines: list[str]) -> MultiLineResponse: - responses = [] - - for response in lines: - responses.append(parse_single_line_response(response)) - - return responses + return [parse_single_line_response(response) for response in lines] def parse_response(response: str) -> Response: