diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-06-07 21:31:47 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-06-07 21:31:47 +0200 |
commit | 43b3b10b716dd78e0ebeab4ac29da0a50aa948f6 (patch) | |
tree | 1fd328a81b962849221eead30fa4955e0ff6f479 | |
parent | c9e4302a687e8d8bba798233aaab85b73c88771d (diff) | |
download | pyserial-git-43b3b10b716dd78e0ebeab4ac29da0a50aa948f6.tar.gz |
style: flake8 findings
-rw-r--r-- | serial/aio.py | 2 | ||||
-rw-r--r-- | serial/rfc2217.py | 2 | ||||
-rw-r--r-- | serial/urlhandler/protocol_loop.py | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/serial/aio.py b/serial/aio.py index 5756be0..85a1bb8 100644 --- a/serial/aio.py +++ b/serial/aio.py @@ -278,7 +278,7 @@ class SerialTransport(asyncio.Transport): def _set_write_buffer_limits(self, high=None, low=None): """Ensure consistent write-buffer limits.""" if high is None: - high = 64*1024 if low is None else 4*low + high = 64 * 1024 if low is None else 4 * low if low is None: low = high // 4 if not high >= low >= 0: diff --git a/serial/rfc2217.py b/serial/rfc2217.py index c8afa95..5e3cbe3 100644 --- a/serial/rfc2217.py +++ b/serial/rfc2217.py @@ -410,7 +410,7 @@ class Serial(SerialBase): if self.is_open: raise SerialException("Port is already open.") try: - self._socket = socket.create_connection(self.from_url(self.portstr), timeout=5) # XXX good value? + self._socket = socket.create_connection(self.from_url(self.portstr), timeout=5) # XXX good value? self._socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) except Exception as msg: self._socket = None diff --git a/serial/urlhandler/protocol_loop.py b/serial/urlhandler/protocol_loop.py index cce9f7d..daf2415 100644 --- a/serial/urlhandler/protocol_loop.py +++ b/serial/urlhandler/protocol_loop.py @@ -99,7 +99,10 @@ class Serial(SerialBase): """extract host and port from an URL string""" parts = urlparse.urlsplit(url) if parts.scheme != "loop": - raise SerialException('expected a string in the form "loop://[?logging={debug|info|warning|error}]": not starting with loop:// (%r)' % (parts.scheme,)) + raise SerialException( + 'expected a string in the form ' + '"loop://[?logging={debug|info|warning|error}]": not starting ' + 'with loop:// (%r)' % (parts.scheme,)) try: # process options now, directly altering self for option, values in urlparse.parse_qs(parts.query, True).items(): @@ -111,7 +114,9 @@ class Serial(SerialBase): else: raise ValueError('unknown option: %r' % (option,)) except ValueError as e: - raise SerialException('expected a string in the form "loop://[?logging={debug|info|warning|error}]": %s' % e) + raise SerialException( + 'expected a string in the form ' + '"loop://[?logging={debug|info|warning|error}]": %s' % e) # - - - - - - - - - - - - - - - - - - - - - - - - |