diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-28 10:37:53 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-28 10:37:53 -0400 |
commit | 24e17bcd1bc03397867ef4aa7ffcf1964453987b (patch) | |
tree | 14898f2ea0cd11ce1d283a0b763fdfbf628ba8df | |
parent | 217427fd3c8c62a3dc5058adfdba96492a0a867c (diff) | |
download | cherrypy-git-24e17bcd1bc03397867ef4aa7ffcf1964453987b.tar.gz |
Remove exemption for extra long lines. Updated code to conform with standard 79 character limitation. Fixes #1652.
-rw-r--r-- | .pre-commit-config.yaml | 3 | ||||
-rw-r--r-- | cherrypy/_cpreqbody.py | 3 | ||||
-rw-r--r-- | cherrypy/lib/auth_basic.py | 3 | ||||
-rw-r--r-- | cherrypy/lib/auth_digest.py | 4 | ||||
-rw-r--r-- | cherrypy/process/wspbus.py | 5 | ||||
-rw-r--r-- | cherrypy/test/_test_states_demo.py | 4 | ||||
-rw-r--r-- | cherrypy/test/logtest.py | 5 | ||||
-rw-r--r-- | cherrypy/test/modwsgi.py | 2 | ||||
-rwxr-xr-x | cherrypy/test/sessiondemo.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_caching.py | 5 | ||||
-rw-r--r-- | cherrypy/test/test_compat.py | 5 | ||||
-rw-r--r-- | cherrypy/test/test_conn.py | 8 | ||||
-rw-r--r-- | cherrypy/test/test_core.py | 31 | ||||
-rw-r--r-- | cherrypy/test/test_http.py | 24 | ||||
-rw-r--r-- | cherrypy/test/test_httputil.py | 17 | ||||
-rw-r--r-- | cherrypy/test/test_iterator.py | 3 | ||||
-rw-r--r-- | cherrypy/test/test_logging.py | 10 | ||||
-rw-r--r-- | cherrypy/test/test_request_obj.py | 16 | ||||
-rwxr-xr-x | cherrypy/test/test_session.py | 6 | ||||
-rw-r--r-- | cherrypy/test/test_static.py | 10 | ||||
-rw-r--r-- | docs/conf.py | 14 |
21 files changed, 126 insertions, 54 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd7022e8..e90dc32c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,9 +6,6 @@ repos: exclude: cherrypy/test/static/index.html - id: flake8 args: - # 79 chars is too strict and we don't have 80-char terminals nowadays, - # 160 chars is too much since it doesn't let us use split view efficiently: - - --max-line-length=120 - --ignore=E731,W503 - id: check-merge-conflict - id: double-quote-string-fixer diff --git a/cherrypy/_cpreqbody.py b/cherrypy/_cpreqbody.py index 693afd2d..f4acc81f 100644 --- a/cherrypy/_cpreqbody.py +++ b/cherrypy/_cpreqbody.py @@ -586,7 +586,8 @@ class Part(Entity): entity without raising an error is stored as :attr:`entity.charset<cherrypy._cpreqbody.Entity.charset>`. This defaults to ``['utf-8']`` (plus 'ISO-8859-1' for "text/\*" types, as required by - `HTTP/1.1 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_), + `HTTP/1.1 + <http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_), but ``['us-ascii', 'utf-8']`` for multipart parts. """ diff --git a/cherrypy/lib/auth_basic.py b/cherrypy/lib/auth_basic.py index c9c9bd55..44eb9b14 100644 --- a/cherrypy/lib/auth_basic.py +++ b/cherrypy/lib/auth_basic.py @@ -73,7 +73,8 @@ def basic_auth(realm, checkpassword, debug=False): auth_header = request.headers.get('authorization') if auth_header is not None: # split() error, base64.decodestring() error - with cherrypy.HTTPError.handle((ValueError, binascii.Error), 400, 'Bad Request'): + msg = 'Bad Request' + with cherrypy.HTTPError.handle((ValueError, binascii.Error), 400, msg): scheme, params = auth_header.split(' ', 1) if scheme.lower() == 'basic': username, password = base64_decode(params).split(':', 1) diff --git a/cherrypy/lib/auth_digest.py b/cherrypy/lib/auth_digest.py index c85e11f6..c654889c 100644 --- a/cherrypy/lib/auth_digest.py +++ b/cherrypy/lib/auth_digest.py @@ -354,8 +354,8 @@ def digest_auth(realm, get_ha1, key, debug=False): auth_header = request.headers.get('authorization') nonce_is_stale = False if auth_header is not None: - with cherrypy.HTTPError.handle( - ValueError, 400, 'The Authorization header could not be parsed.'): + msg = 'The Authorization header could not be parsed.' + with cherrypy.HTTPError.handle(ValueError, 400, msg): auth = HttpDigestAuthorization( auth_header, request.method, debug=debug) diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py index 024c0854..67d4559a 100644 --- a/cherrypy/process/wspbus.py +++ b/cherrypy/process/wspbus.py @@ -344,7 +344,8 @@ class Bus(object): if ( t != threading.currentThread() and not isinstance(t, threading._MainThread) and - # Note that any dummy (external) threads are always daemonic. + # Note that any dummy (external) threads are + # always daemonic. not t.daemon ): self.log('Waiting for thread %s.' % t.getName()) @@ -503,7 +504,7 @@ class Bus(object): :seealso: https://github.com/cherrypy/cherrypy/issues/1506 :seealso: https://github.com/cherrypy/cherrypy/issues/1512 - :ref: https://chromium.googlesource.com/infra/infra/+/69eb0279c12bcede5937ce9298020dd4581e38dd%5E!/ + :ref: http://bit.ly/2gK6bXK """ raise NotImplementedError else: diff --git a/cherrypy/test/_test_states_demo.py b/cherrypy/test/_test_states_demo.py index aef1f5ed..97154177 100644 --- a/cherrypy/test/_test_states_demo.py +++ b/cherrypy/test/_test_states_demo.py @@ -63,7 +63,9 @@ def log_test_case_name(): if cherrypy.config.get('test_case_name', False): cherrypy.log('STARTED FROM: %s' % cherrypy.config.get('test_case_name')) -cherrypy.engine.subscribe('start', log_test_case_name, priority=6) # noqa: E305 + + +cherrypy.engine.subscribe('start', log_test_case_name, priority=6) cherrypy.tree.mount(Root(), '/', {'/': {}}) diff --git a/cherrypy/test/logtest.py b/cherrypy/test/logtest.py index 9775ba65..b51a0e32 100644 --- a/cherrypy/test/logtest.py +++ b/cherrypy/test/logtest.py @@ -170,7 +170,10 @@ class LogCase(object): been marked (using self.markLog), the entire log will be searched. """ data = self._read_marked_region(marker) - data = [chunk.decode('utf-8').rstrip('\n').rstrip('\r') for chunk in data] + data = [ + chunk.decode('utf-8').rstrip('\n').rstrip('\r') + for chunk in data + ] for log_chunk in data: try: uuid_log = data[-1] diff --git a/cherrypy/test/modwsgi.py b/cherrypy/test/modwsgi.py index fe3a1db9..6e2fa3df 100644 --- a/cherrypy/test/modwsgi.py +++ b/cherrypy/test/modwsgi.py @@ -88,7 +88,7 @@ LoadModule env_module modules/mod_env.so WSGIScriptAlias / "%(curdir)s/modwsgi.py" SetEnv testmod %(testmod)s -""" +""" # noqa class ModWSGISupervisor(helper.Supervisor): diff --git a/cherrypy/test/sessiondemo.py b/cherrypy/test/sessiondemo.py index c7d3511b..cfae9263 100755 --- a/cherrypy/test/sessiondemo.py +++ b/cherrypy/test/sessiondemo.py @@ -95,7 +95,7 @@ function init() { <tr><th>Python Version:</th><td>%(pyversion)s</td></tr> </table> </body></html> -""" +""" # noqa class Root(object): diff --git a/cherrypy/test/test_caching.py b/cherrypy/test/test_caching.py index ac8854ee..4a459a3f 100644 --- a/cherrypy/test/test_caching.py +++ b/cherrypy/test/test_caching.py @@ -285,7 +285,10 @@ class CacheTest(helper.CPWebCase): self.assertHeader('Expires', 'Sun, 28 Jan 2007 00:00:00 GMT') def _assert_resp_len_and_enc_for_gzip(self, uri): - """Test that after querying gzipped content it's remains valid in cache and available non-gzipped as well.""" + """ + Test that after querying gzipped content it's remains valid in + cache and available non-gzipped as well. + """ ACCEPT_GZIP_HEADERS = [('Accept-Encoding', 'gzip')] content_len = None diff --git a/cherrypy/test/test_compat.py b/cherrypy/test/test_compat.py index f6aad70d..44a9fa31 100644 --- a/cherrypy/test/test_compat.py +++ b/cherrypy/test/test_compat.py @@ -28,4 +28,7 @@ class EscapeTester(unittest.TestCase): def test_escape_quote(self): """test_escape_quote - Verify the output for &<>"' chars.""" - self.assertEqual("""xx&<>"aa'""", compat.escape_html("""xx&<>"aa'""")) + self.assertEqual( + """xx&<>"aa'""", + compat.escape_html("""xx&<>"aa'"""), + ) diff --git a/cherrypy/test/test_conn.py b/cherrypy/test/test_conn.py index 3f47b19e..1b691d3d 100644 --- a/cherrypy/test/test_conn.py +++ b/cherrypy/test/test_conn.py @@ -799,7 +799,8 @@ class LimitedRequestQueueTests(helper.CPWebCase): conn.endheaders() conns.append(conn) - # Now try a 16th conn, which should be closed by the server immediately. + # Now try a 16th conn, which should be closed by the + # server immediately. overflow_conn = self.HTTP_CONN(self.HOST, self.PORT) # Manually connect since httplib won't let us set a timeout for res in socket.getaddrinfo(self.HOST, self.PORT, 0, @@ -813,7 +814,10 @@ class LimitedRequestQueueTests(helper.CPWebCase): overflow_conn.putrequest('GET', '/', skip_host=True) overflow_conn.putheader('Host', self.HOST) overflow_conn.endheaders() - response = overflow_conn.response_class(overflow_conn.sock, method='GET') + response = overflow_conn.response_class( + overflow_conn.sock, + method='GET', + ) try: response.begin() except socket.error as exc: diff --git a/cherrypy/test/test_core.py b/cherrypy/test/test_core.py index 84f76c75..ef5f5016 100644 --- a/cherrypy/test/test_core.py +++ b/cherrypy/test/test_core.py @@ -156,7 +156,8 @@ class CoreRequestHandlingTest(helper.CPWebCase): raise cherrypy.HTTPRedirect("/some\"url/that'we/want") def url_with_xss(self): - raise cherrypy.HTTPRedirect("/some<script>alert(1);</script>url/that'we/want") + raise cherrypy.HTTPRedirect( + "/some<script>alert(1);</script>url/that'we/want") def url_with_unicode(self): raise cherrypy.HTTPRedirect(ntou('ัะตัั', 'utf-8')) @@ -324,8 +325,10 @@ class CoreRequestHandlingTest(helper.CPWebCase): # Make sure GET params are preserved. self.getPage('/redirect?id=3') self.assertStatus(301) - self.assertMatchesBody('<a href=([\'"])%s/redirect/[?]id=3\\1>' - '%s/redirect/[?]id=3</a>' % (self.base(), self.base())) + self.assertMatchesBody( + '<a href=([\'"])%s/redirect/[?]id=3\\1>' + '%s/redirect/[?]id=3</a>' % (self.base(), self.base()) + ) if self.prefix(): # Corner case: the "trailing slash" redirect could be tricky if @@ -340,9 +343,11 @@ class CoreRequestHandlingTest(helper.CPWebCase): # Make sure GET params are preserved. self.getPage('/redirect/by_code/?code=307') self.assertStatus(301) - self.assertMatchesBody("<a href=(['\"])%s/redirect/by_code[?]code=307\\1>" - '%s/redirect/by_code[?]code=307</a>' - % (self.base(), self.base())) + self.assertMatchesBody( + "<a href=(['\"])%s/redirect/by_code[?]code=307\\1>" + '%s/redirect/by_code[?]code=307</a>' + % (self.base(), self.base()) + ) # If the trailing_slash tool is off, CP should just continue # as if the slashes were correct. But it needs some help @@ -428,9 +433,14 @@ class CoreRequestHandlingTest(helper.CPWebCase): def assertValidXHTML(): from xml.etree import ElementTree try: - ElementTree.fromstring('<html><body>%s</body></html>' % self.body) - except ElementTree.ParseError as e: # noqa: F841 - self._handlewebError('automatically generated redirect did not generate well-formed html') + ElementTree.fromstring( + '<html><body>%s</body></html>' % self.body, + ) + except ElementTree.ParseError: + self._handlewebError( + 'automatically generated redirect did not ' + 'generate well-formed html', + ) # check redirects to URLs generated valid HTML - we check this # by seeing if it appears as valid XHTML. @@ -444,7 +454,8 @@ class CoreRequestHandlingTest(helper.CPWebCase): assertValidXHTML() def test_redirect_with_xss(self): - """A redirect to a URL with HTML injected should result in page contents escaped.""" + """A redirect to a URL with HTML injected should result + in page contents escaped.""" self.getPage('/redirect/url_with_xss') self.assertStatus(303) assert b'<script>' not in self.body diff --git a/cherrypy/test/test_http.py b/cherrypy/test/test_http.py index d615f129..1481492c 100644 --- a/cherrypy/test/test_http.py +++ b/cherrypy/test/test_http.py @@ -8,6 +8,7 @@ from unittest import mock import six from six.moves.http_client import HTTPConnection +from six.moves import urllib import cherrypy from cherrypy._cpcompat import HTTPSConnection, ntob @@ -116,7 +117,11 @@ class HTTPTests(helper.CPWebCase): c = HTTPConnection('%s:%s' % (self.interface(), self.PORT)) # `_get_content_length` is needed for Python 3.6+ - with mock.patch.object(c, '_get_content_length', lambda body, method: None, create=True): + with mock.patch.object( + c, + '_get_content_length', + lambda body, method: None, + create=True): # `_set_content_length` is needed for Python 2.7-3.5 with mock.patch.object(c, '_set_content_length', create=True): c.request('POST', '/') @@ -148,7 +153,8 @@ class HTTPTests(helper.CPWebCase): self.body = response.fp.read() self.status = str(response.status) self.assertStatus(200) - self.assertBody(', '.join(['%s * 65536' % c for c in alphabet])) # noqa: F812 + parts = ['%s * 65536' % ch for ch in alphabet] + self.assertBody(', '.join(parts)) def test_post_filename_with_special_characters(self): '''Testing that we can handle filenames with special characters. This @@ -197,11 +203,15 @@ class HTTPTests(helper.CPWebCase): c.close() def test_request_line_split_issue_1220(self): - Request_URI = ( - '/index?intervenant-entreprise-evenement_classaction=evenement-mailremerciements' - '&_path=intervenant-entreprise-evenement&intervenant-entreprise-evenement_action-id=19404' - '&intervenant-entreprise-evenement_id=19404&intervenant-entreprise_id=28092' - ) + params = { + 'intervenant-entreprise-evenement_classaction': + 'evenement-mailremerciements', + '_path': 'intervenant-entreprise-evenement', + 'intervenant-entreprise-evenement_action-id': 19404, + 'intervenant-entreprise-evenement_id': 19404, + 'intervenant-entreprise_id': 28092, + } + Request_URI = '/index?' + urllib.parse.urlencode(params) self.assertEqual(len('GET %s HTTP/1.1\r\n' % Request_URI), 256) self.getPage(Request_URI) self.assertBody('Hello world!') diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py index 7b0691c6..656b8a3d 100644 --- a/cherrypy/test/test_httputil.py +++ b/cherrypy/test/test_httputil.py @@ -33,8 +33,12 @@ def test_urljoin(script_name, path_info, expected_url): EXPECTED_200 = (200, 'OK', 'Request fulfilled, document follows') -EXPECTED_500 = (500, 'Internal Server Error', - 'The server encountered an unexpected condition which prevented it from fulfilling the request.') +EXPECTED_500 = ( + 500, + 'Internal Server Error', + 'The server encountered an unexpected condition which ' + 'prevented it from fulfilling the request.', +) EXPECTED_404 = (404, 'Not Found', 'Nothing matches the given URI') EXPECTED_444 = (444, 'Non-existent reason', '') @@ -50,7 +54,8 @@ EXPECTED_444 = (444, 'Non-existent reason', '') ] ) def test_valid_status(status, expected_status): - """Check valid int, string and http_client-constants statuses processing.""" + """Check valid int, string and http_client-constants + statuses processing.""" assert httputil.valid_status(status) == expected_status @@ -58,7 +63,11 @@ def test_valid_status(status, expected_status): 'status_code,error_msg', [ ('hey', "Illegal response status from server ('hey' is non-numeric)."), - ({'hey': 'hi'}, "Illegal response status from server ({'hey': 'hi'} is non-numeric)."), + ( + {'hey': 'hi'}, + 'Illegal response status from server ' + "({'hey': 'hi'} is non-numeric).", + ), (1, 'Illegal response status from server (1 is out of range).'), (600, 'Illegal response status from server (600 is out of range).'), ] diff --git a/cherrypy/test/test_iterator.py b/cherrypy/test/test_iterator.py index b8beacd9..92f08e7c 100644 --- a/cherrypy/test/test_iterator.py +++ b/cherrypy/test/test_iterator.py @@ -139,7 +139,8 @@ class IteratorTest(helper.CPWebCase): headers = response.getheaders() for header_name, header_value in headers: if header_name.lower() == 'content-length': - assert header_value == six.text_type(1024 * 16 * 256), header_value + expected = six.text_type(1024 * 16 * 256) + assert header_value == expected, header_value break else: raise AssertionError('No Content-Length header found') diff --git a/cherrypy/test/test_logging.py b/cherrypy/test/test_logging.py index d11c67c8..4d686775 100644 --- a/cherrypy/test/test_logging.py +++ b/cherrypy/test/test_logging.py @@ -114,7 +114,8 @@ class AccessLogTests(helper.CPWebCase, logtest.LogCase): '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(o)s' ) def testCustomLogFormat(self): - """Test a customized access_log_format string, which is a feature of _cplogging.LogManager.access().""" + """Test a customized access_log_format string, which is a + feature of _cplogging.LogManager.access().""" self.markLog() self.getPage('/as_string', headers=[('Referer', 'REFERER'), ('User-Agent', 'USERAGENT'), @@ -130,11 +131,14 @@ class AccessLogTests(helper.CPWebCase, logtest.LogCase): '%(h)s %(l)s %(u)s %(z)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(o)s' ) def testTimezLogFormat(self): - """Test a customized access_log_format string, which is a feature of _cplogging.LogManager.access().""" + """Test a customized access_log_format string, which is a + feature of _cplogging.LogManager.access().""" self.markLog() expected_time = str(cherrypy._cplogging.LazyRfc3339UtcTime()) - with mock.patch('cherrypy._cplogging.LazyRfc3339UtcTime', lambda: expected_time): + with mock.patch( + 'cherrypy._cplogging.LazyRfc3339UtcTime', + lambda: expected_time): self.getPage('/as_string', headers=[('Referer', 'REFERER'), ('User-Agent', 'USERAGENT'), ('Host', 'HOST')]) diff --git a/cherrypy/test/test_request_obj.py b/cherrypy/test/test_request_obj.py index c03ba1c9..232440c9 100644 --- a/cherrypy/test/test_request_obj.py +++ b/cherrypy/test/test_request_obj.py @@ -45,7 +45,11 @@ class RequestObjectTests(helper.CPWebCase): @cherrypy.expose def body_example_com_3128(self): """Handle CONNECT method.""" - return cherrypy.request.method + 'ed to ' + cherrypy.request.path_info + return ( + cherrypy.request.method + + 'ed to ' + + cherrypy.request.path_info + ) @cherrypy.expose def request_uuid4(self): @@ -323,11 +327,17 @@ class RequestObjectTests(helper.CPWebCase): def test_per_request_uuid4(self): self.getPage('/request_uuid4') first_uuid4, _, second_uuid4 = self.body.decode().partition(' ') - assert uuid.UUID(first_uuid4, version=4) == uuid.UUID(second_uuid4, version=4) + assert ( + uuid.UUID(first_uuid4, version=4) + == uuid.UUID(second_uuid4, version=4) + ) self.getPage('/request_uuid4') third_uuid4, _, _ = self.body.decode().partition(' ') - assert uuid.UUID(first_uuid4, version=4) != uuid.UUID(third_uuid4, version=4) + assert ( + uuid.UUID(first_uuid4, version=4) + != uuid.UUID(third_uuid4, version=4) + ) def testRelativeURIPathInfo(self): self.getPage('/pathinfo/foo/bar') diff --git a/cherrypy/test/test_session.py b/cherrypy/test/test_session.py index b3ff465c..e5293d51 100755 --- a/cherrypy/test/test_session.py +++ b/cherrypy/test/test_session.py @@ -26,7 +26,8 @@ def http_methods_allowed(methods=['GET', 'HEAD']): cherrypy.response.headers['Allow'] = ', '.join(methods) raise cherrypy.HTTPError(405) -cherrypy.tools.allow = cherrypy.Tool('on_start_resource', http_methods_allowed) # noqa: E305 + +cherrypy.tools.allow = cherrypy.Tool('on_start_resource', http_methods_allowed) def setup_server(): @@ -388,7 +389,8 @@ class SessionTest(helper.CPWebCase): assert len(sessions.RamSession.locks) == 1, 'Lock not acquired' s2 = sessions.RamSession() s2.clean_up() - assert len(sessions.RamSession.locks) == 1, 'Clean up should not remove active lock' + msg = 'Clean up should not remove active lock' + assert len(sessions.RamSession.locks) == 1, msg t.join() diff --git a/cherrypy/test/test_static.py b/cherrypy/test/test_static.py index ff5543cf..5dc5a144 100644 --- a/cherrypy/test/test_static.py +++ b/cherrypy/test/test_static.py @@ -191,7 +191,8 @@ class StaticTest(helper.CPWebCase): @pytest.mark.skipif(platform.system() != 'Windows', reason='Windows only') def test_static_longpath(self): - """Test serving of a file in subdir of a Windows long-path staticdir.""" + """Test serving of a file in subdir of a Windows long-path + staticdir.""" self.getPage('/static-long/static/index.html') self.assertStatus('200 OK') self.assertHeader('Content-Type', 'text/html') @@ -218,8 +219,11 @@ class StaticTest(helper.CPWebCase): self.getPage('/docroot') self.assertStatus(301) self.assertHeader('Location', '%s/docroot/' % self.base()) - self.assertMatchesBody("This resource .* <a href=(['\"])%s/docroot/\\1>" - '%s/docroot/</a>.' % (self.base(), self.base())) + self.assertMatchesBody( + "This resource .* <a href=(['\"])%s/docroot/\\1>" + '%s/docroot/</a>.' + % (self.base(), self.base()) + ) def test_config_errors(self): # Check that we get an error if no .file or .dir diff --git a/docs/conf.py b/docs/conf.py index 6ba33633..3ba18fb2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -178,8 +178,12 @@ html_static_path = ['_static'] # Custom sidebar templates, maps document names to template names. html_sidebars = { - 'index': ['about.html', 'searchbox.html', 'navigation.html', 'python_2_eol.html'], - '**': ['about.html', 'searchbox.html', 'navigation.html', 'python_2_eol.html'], + 'index': [ + 'about.html', 'searchbox.html', 'navigation.html', 'python_2_eol.html', + ], + '**': [ + 'about.html', 'searchbox.html', 'navigation.html', 'python_2_eol.html', + ], } # Additional templates that should be rendered to pages, maps page names to @@ -290,9 +294,11 @@ link_files = { url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), dict( - # FIXME: currently this puts #v1.2.3 style version into URL, but it should be v1-2-3 + # FIXME: currently this puts #v1.2.3 style version + # into URL, but it should be v1-2-3 pattern=r'cheroot v?(?P<cheroot_version>\d+(\.\d+){1,2})', - url='https://cheroot.readthedocs.io/en/latest/history.html#v{cheroot_version}', + url='https://cheroot.readthedocs.io' + '/en/latest/history.html#v{cheroot_version}', ), ], ), |