Skip to content

Commit

Permalink
Fix a flake8 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Mar 27, 2022
1 parent aee4e42 commit 81830cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sphinx/ext/extlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def check_uri(self, refnode: nodes.reference) -> None:

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>.+)'))
Expand Down

0 comments on commit 81830cc

Please sign in to comment.