mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix a flake8 warning
This commit is contained in:
@@ -72,7 +72,8 @@ class ExternalLinksChecker(SphinxPostTransform):
|
||||
|
||||
for alias, (base_uri, _caption) in self.app.config.extlinks.items():
|
||||
if sys.version_info < (3, 7):
|
||||
# Replace a leading backslash because re.escape() inserts a backslash before % on python 3.6
|
||||
# Replace a leading backslash because re.escape() inserts a backslash before %
|
||||
# on python 3.6
|
||||
uri_pattern = re.compile(re.escape(base_uri).replace('\\%s', '(?P<value>.+)'))
|
||||
else:
|
||||
uri_pattern = re.compile(re.escape(base_uri).replace('%s', '(?P<value>.+)'))
|
||||
|
||||
Reference in New Issue
Block a user