Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-27 17:58:39 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-27 17:58:39 +0300
commit81830cc77047ce39eab056a70b44a2d97848550c (patch)
tree91b905178622f89c67dfc4fb49e3504ccc1f3279
parentaee4e42b81d56c57e1311176ce175ba3374baa0a (diff)
Fix a flake8 warning
-rw-r--r--sphinx/ext/extlinks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py
index a574d665a..659a92b79 100644
--- a/sphinx/ext/extlinks.py
+++ b/sphinx/ext/extlinks.py
@@ -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>.+)'))