Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-42238: Fix small rst issue in NEWS.d/. #27238

Merged
merged 3 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Doc/tools/rstlint.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
":newsgroup:",
":code:",
":py:func:",
":memory:",
":makevar:",
":guilabel:",
":title-reference:",
Expand Down Expand Up @@ -123,6 +122,13 @@
double_backtick_role = re.compile(r"(?<!``)%s``" % all_roles)


# Find role used with no backticks instead of simple backticks like:
# :const:None
# instead of:
# :const:`None`
role_with_no_backticks = re.compile(r"%s[^` ]" % all_roles)


default_role_re = re.compile(r"(^| )`\w([^`]*?\w)?`($| )")
leaked_markup_re = re.compile(r"[a-z]::\s|`|\.\.\s*\w+:")

Expand Down Expand Up @@ -168,6 +174,8 @@ def check_suspicious_constructs(fn, lines):
yield lno, "directive should start with two dots, not three."
if double_backtick_role.search(line):
yield lno, "role use a single backtick, double backtick found."
if role_with_no_backticks.search(line):
yield lno, "role use a single backtick, no backtick found."
if ".. productionlist::" in line:
inprod = True
elif not inprod and default_role_re.search(line):
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Refactor argument processing in :func:pdb.main to simplify detection of errors in input loading and clarify behavior around module or script invocation.
Refactor argument processing in :func:`pdb.main` to simplify detection of errors in input loading and clarify behavior around module or script invocation.