summaryrefslogtreecommitdiff
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
parent6d5b1d3822ba598f75af64a6cec27c54be81395f (diff)
downloadcherrypy-git-49401127ca9082b5bdf9ea20d71ddf107fa73cb2.tar.gz
🎨 Upgrade pydocstyle to the recent version
-rw-r--r--.pre-commit-config-pep257.yaml4
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--cherrypy/lib/static.py12
3 files changed, 11 insertions, 9 deletions
diff --git a/.pre-commit-config-pep257.yaml b/.pre-commit-config-pep257.yaml
index af617214..84eab227 100644
--- a/.pre-commit-config-pep257.yaml
+++ b/.pre-commit-config-pep257.yaml
@@ -1,8 +1,8 @@
---
repos:
-- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle.git
- rev: v2.1.1
+- repo: https://github.com/PyCQA/pydocstyle.git
+ rev: 6.2.2
hooks:
- id: pydocstyle
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7f694de0..0309b312 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -28,8 +28,8 @@ repos:
exclude: cherrypy/test/test.pem
- id: requirements-txt-fixer
-- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle.git
- rev: v2.1.1
+- repo: https://github.com/PyCQA/pydocstyle.git
+ rev: 6.2.2
hooks:
- id: pydocstyle
exclude: |
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