Skip to content

Commit

Permalink
fix formatting to satisfy linters
Browse files Browse the repository at this point in the history
  • Loading branch information
vashek committed Nov 2, 2020
1 parent 4744cd1 commit 5af5b6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions cheroot/makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ def write(self, b):
return len(b)

def _safe_call(self, is_reader, call, *args, **kwargs): # noqa: C901
"""Method to be overridden in subclasses/mix-ins. Intended to call the
supplied callable with retries, as needed."""
"""Call the supplied callable with retries, as needed.
Method to be overridden in subclasses/mix-ins.
"""
return call(*args, **kwargs)

def _flush_unlocked(self):
Expand All @@ -47,8 +49,9 @@ def _flush_unlocked(self):
try:
# ssl sockets only except 'bytes', not bytearrays
# so perhaps we should conditionally wrap this for perf?
n = self._safe_call(False, self.raw.write,
bytes(self._write_buf))
n = self._safe_call(
False, self.raw.write, bytes(self._write_buf)
)
except io.BlockingIOError as e:
n = e.characters_written
del self._write_buf[:n]
Expand Down
11 changes: 7 additions & 4 deletions cheroot/ssl/pyopenssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ def read(self, *args, **kwargs):
)

def sendall(self, *args, **kwargs):
"""Send whole message to the socket - not supported due to
https://github.com/pyca/pyopenssl/issues/176."""
raise NotImplementedError("sendall() not supported on pyOpenSSL due "
"to issue #176")
"""Send whole message to the socket.
Not supported due to https://github.com/pyca/pyopenssl/issues/176.
"""
raise NotImplementedError(
'sendall() not supported on pyOpenSSL due to issue #176'
)

def send(self, *args, **kwargs):
"""Send some part of message to the socket."""
Expand Down

0 comments on commit 5af5b6a

Please sign in to comment.