mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -88,10 +88,7 @@ def recv_decode(sock, amount, decode=True):
|
||||
|
||||
|
||||
def receive_exactly(sock, amount, msg, expect, decode=True):
|
||||
if decode:
|
||||
data = []
|
||||
else:
|
||||
data = b""
|
||||
data = [] if decode else b""
|
||||
|
||||
try:
|
||||
data += recv_decode(sock, 1, decode=decode)
|
||||
|
||||
Reference in New Issue
Block a user