Skip to content

Commit a90d1f1

Browse files
committed
forgor black
1 parent ff6cd73 commit a90d1f1

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,11 @@ def parse_dhcp_response(
274274

275275
# -- Parse Packet, FIXED -- #
276276
# Validate OP
277-
if (_BUFF[0] != DHCP_BOOT_REPLY):
278-
raise AssertionError("Malformed Packet - \
279-
DHCP message OP is not expected BOOT Reply.")
277+
if _BUFF[0] != DHCP_BOOT_REPLY:
278+
raise AssertionError(
279+
"Malformed Packet - \
280+
DHCP message OP is not expected BOOT Reply."
281+
)
280282

281283
xid = _BUFF[4:8]
282284
if bytes(xid) < self._initial_xid:

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def listen(self, backlog: Optional[int] = None) -> None:
283283
284284
:param Optional[int] backlog: Included for compatibility but ignored.
285285
"""
286-
if (self._listen_port is None):
286+
if self._listen_port is None:
287287
raise AssertionError("Use bind to set the port before listen!")
288288
_the_interface.socket_listen(self.socknum, self._listen_port)
289289
self._buffer = b""
@@ -341,8 +341,10 @@ def connect(
341341
:param Optional[int] conntype: Raises an exception if set to 3, unused otherwise, defaults
342342
to None.
343343
"""
344-
if (conntype == 0x03):
345-
raise AssertionError("Error: SSL/TLS is not currently supported by CircuitPython.")
344+
if conntype == 0x03:
345+
raise AssertionError(
346+
"Error: SSL/TLS is not currently supported by CircuitPython."
347+
)
346348
host, port = address
347349

348350
if hasattr(host, "split"):
@@ -565,7 +567,7 @@ def readline(self) -> bytes:
565567

566568
def disconnect(self) -> None:
567569
"""Disconnect a TCP socket."""
568-
if (self._sock_type != SOCK_STREAM):
570+
if self._sock_type != SOCK_STREAM:
569571
raise AssertionError("Socket must be a TCP socket.")
570572
_the_interface.socket_disconnect(self.socknum)
571573

0 commit comments

Comments
 (0)