Skip to content

Commit

Permalink
Use list comprehension in parse_response
Browse files Browse the repository at this point in the history
Co-authored-by: Akseli Lukkarila <akseli.lukkarila@nitor.com>
  • Loading branch information
Jalle19 and Esgrove authored Sep 11, 2024
1 parent de372d2 commit c02cca5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions custom_components/vinx/lw3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c02cca5

Please sign in to comment.