Skip to content

Commit

Permalink
cleanupo
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Oct 17, 2023
1 parent 176cbbb commit 97d9e75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aioesphomeapi/_frame_helper/plain_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def _bytes_to_varuint(value: _bytes) -> _int | None:
"""Convert bytes to a varuint."""
result = 0
bitpos = 0
for pos in range(0, len(value)):
val = value[pos]
for val in value:
result |= (val & 0x7F) << bitpos
if (val & 0x80) == 0:
return result
Expand Down

0 comments on commit 97d9e75

Please sign in to comment.