summaryrefslogtreecommitdiff
path: root/cherrypy/lib
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2023-01-05 05:17:01 +0100
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2023-01-05 05:18:35 +0100
commit49401127ca9082b5bdf9ea20d71ddf107fa73cb2 (patch)
treecd6e2d82407f705d191827a2c7792f8ec15e531c /cherrypy/lib
parent6d5b1d3822ba598f75af64a6cec27c54be81395f (diff)
downloadcherrypy-git-49401127ca9082b5bdf9ea20d71ddf107fa73cb2.tar.gz
🎨 Upgrade pydocstyle to the recent version
Diffstat (limited to 'cherrypy/lib')
-rw-r--r--cherrypy/lib/static.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py
index 66a5a947..c1ad95f3 100644
--- a/cherrypy/lib/static.py
+++ b/cherrypy/lib/static.py
@@ -1,19 +1,18 @@
"""Module with helpers for serving static files."""
+import mimetypes
import os
import platform
import re
import stat
-import mimetypes
-import urllib.parse
import unicodedata
-
+import urllib.parse
from email.generator import _make_boundary as make_boundary
from io import UnsupportedOperation
import cherrypy
from cherrypy._cpcompat import ntob
-from cherrypy.lib import cptools, httputil, file_generator_limited
+from cherrypy.lib import cptools, file_generator_limited, httputil
def _setup_mimetypes():
@@ -185,7 +184,10 @@ def serve_fileobj(fileobj, content_type=None, disposition=None, name=None,
def _serve_fileobj(fileobj, content_type, content_length, debug=False):
- """Internal. Set response.body to the given file object, perhaps ranged."""
+ """Set ``response.body`` to the given file object, perhaps ranged.
+
+ Internal helper.
+ """
response = cherrypy.serving.response
# HTTP/1.0 didn't have Range/Accept-Ranges headers, or the 206 code