style: some of the suggestions from flake8
diff --git a/serial/rfc2217.py b/serial/rfc2217.py
index 049bd6b..119f039 100644
--- a/serial/rfc2217.py
+++ b/serial/rfc2217.py
@@ -199,7 +199,8 @@
PURGE_RECEIVE_BUFFER = b'\x01' # Purge access server receive data buffer
PURGE_TRANSMIT_BUFFER = b'\x02' # Purge access server transmit data buffer
-PURGE_BOTH_BUFFERS = b'\x03' # Purge both the access server receive data buffer and the access server transmit data buffer
+PURGE_BOTH_BUFFERS = b'\x03' # Purge both the access server receive data
+ # buffer and the access server transmit data buffer
RFC2217_PARITY_MAP = {
@@ -233,7 +234,8 @@
class TelnetOption(object):
"""Manage a single telnet option, keeps track of DO/DONT WILL/WONT."""
- def __init__(self, connection, name, option, send_yes, send_no, ack_yes, ack_no, initial_state, activation_callback=None):
+ def __init__(self, connection, name, option, send_yes, send_no, ack_yes,
+ ack_no, initial_state, activation_callback=None):
"""\
Initialize option.
:param connection: connection used to transmit answers
diff --git a/serial/serialwin32.py b/serial/serialwin32.py
index f23baba..f7e3ba8 100644
--- a/serial/serialwin32.py
+++ b/serial/serialwin32.py
@@ -275,10 +275,19 @@
if n > 0:
buf = ctypes.create_string_buffer(n)
rc = win32.DWORD()
- read_ok = win32.ReadFile(self._port_handle, buf, n, ctypes.byref(rc), ctypes.byref(self._overlapped_read))
+ read_ok = win32.ReadFile(
+ self._port_handle,
+ buf,
+ n,
+ ctypes.byref(rc),
+ ctypes.byref(self._overlapped_read))
if not read_ok and win32.GetLastError() not in (win32.ERROR_SUCCESS, win32.ERROR_IO_PENDING):
raise SerialException("ReadFile failed (%r)" % ctypes.WinError())
- win32.GetOverlappedResult(self._port_handle, ctypes.byref(self._overlapped_read), ctypes.byref(rc), True)
+ win32.GetOverlappedResult(
+ self._port_handle,
+ ctypes.byref(self._overlapped_read),
+ ctypes.byref(rc),
+ True)
read = buf.raw[:rc.value]
else:
read = bytes()