Skip to content

Commit e1cd639

Browse files
committed
Reformatted by black.
1 parent afdc6ae commit e1cd639

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

adafruit_espatcontrol/adafruit_espatcontrol_socket.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def connect(self, address, conntype=None):
4747
"""Connect the socket to the 'address' (which should be dotted quad IP). 'conntype'
4848
is an extra that may indicate SSL or not, depending on the underlying interface"""
4949
host, port = address
50-
50+
5151
# Determine the conntype from port if not specified.
5252
if conntype is None:
5353
if port == 80:
5454
conntype = "TCP"
5555
elif port == 443:
5656
conntype = "SSL"
57-
57+
5858
if not _the_interface.socket_connect(
5959
conntype, host, port, keepalive=10, retries=3
6060
):
@@ -82,8 +82,10 @@ def recv(self, num=0):
8282
ret = self._buffer + _the_interface.socket_receive(timeout=self._timeout)
8383
self._buffer = b""
8484
else:
85-
if (self._buffer == b""):
86-
self._buffer = self._buffer + _the_interface.socket_receive(timeout=self._timeout)
85+
if self._buffer == b"":
86+
self._buffer = self._buffer + _the_interface.socket_receive(
87+
timeout=self._timeout
88+
)
8789
ret = self._buffer[:num]
8890
self._buffer = self._buffer[num:]
8991
return ret

0 commit comments

Comments
 (0)