summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2023-01-05 04:32:19 +0100
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2023-01-05 05:18:34 +0100
commit02ed51b88c5a6266de63afcbd1e899931f952e84 (patch)
tree197c4e596a2498f1a0a7fc9a65f585cc014d1280
parent93b3beb07eb6fb9bbedd8c739ec0c4cb030915d8 (diff)
downloadcherrypy-git-02ed51b88c5a6266de63afcbd1e899931f952e84.tar.gz
🎨 Adjust line length in code across the repo
This patch makes it shorter to fit the 79 char limit.
-rw-r--r--cherrypy/lib/cptools.py12
-rw-r--r--cherrypy/lib/profiler.py4
-rw-r--r--cherrypy/process/wspbus.py2
3 files changed, 11 insertions, 7 deletions
diff --git a/cherrypy/lib/cptools.py b/cherrypy/lib/cptools.py
index 613a8995..13b4c567 100644
--- a/cherrypy/lib/cptools.py
+++ b/cherrypy/lib/cptools.py
@@ -622,13 +622,15 @@ def autovary(ignore=None, debug=False):
def convert_params(exception=ValueError, error=400):
- """Convert request params based on function annotations, with error handling.
+ """Convert request params based on function annotations.
- exception
- Exception class to catch.
+ This function also processes errors that are subclasses of ``exception``.
- status
- The HTTP error code to return to the client on failure.
+ :param BaseException exception: Exception class to catch.
+ :type exception: BaseException
+
+ :param error: The HTTP status code to return to the client on failure.
+ :type error: int
"""
request = cherrypy.serving.request
types = request.handler.callable.__annotations__
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py
index fccf2eb8..7182278a 100644
--- a/cherrypy/lib/profiler.py
+++ b/cherrypy/lib/profiler.py
@@ -47,7 +47,9 @@ try:
import pstats
def new_func_strip_path(func_name):
- """Make profiler output more readable by adding `__init__` modules' parents
+ """Add ``__init__`` modules' parents.
+
+ This makes the profiler output more readable.
"""
filename, line, name = func_name
if filename.endswith('__init__.py'):
diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py
index 1d2789b1..a60cd51e 100644
--- a/cherrypy/process/wspbus.py
+++ b/cherrypy/process/wspbus.py
@@ -494,7 +494,7 @@ class Bus(object):
"Cannot reconstruct command from '-c'. "
'Ref: https://github.com/cherrypy/cherrypy/issues/1545')
except AttributeError:
- """It looks Py_GetArgcArgv is completely absent in some environments
+ """It looks Py_GetArgcArgv's completely absent in some environments
It is known, that there's no Py_GetArgcArgv in MS Windows and
``ctypes`` module is completely absent in Google AppEngine