File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -1177,15 +1177,15 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1177
1177
1178
1178
Suspend tracing and profiling in the Python thread state *tstate *.
1179
1179
1180
- Resume them using the:c: func:`PyThreadState_LeaveTracing ` function.
1180
+ Resume them using the :c:func: `PyThreadState_LeaveTracing ` function.
1181
1181
1182
1182
.. versionadded :: 3.11
1183
1183
1184
1184
1185
1185
.. c :function :: void PyThreadState_LeaveTracing (PyThreadState *tstate)
1186
1186
1187
1187
Resume tracing and profiling in the Python thread state *tstate * suspended
1188
- by the:c: func:`PyThreadState_EnterTracing ` function.
1188
+ by the :c:func: `PyThreadState_EnterTracing ` function.
1189
1189
1190
1190
See also :c:func: `PyEval_SetTrace ` and :c:func: `PyEval_SetProfile `
1191
1191
functions.
Original file line number Diff line number Diff line change 43
43
]
44
44
45
45
roles = [
46
- ":class:" ,
47
- ":func:" ,
48
- ":meth:" ,
49
- ":mod:" ,
46
+ "(?<!py) :class:" ,
47
+ "(?<!:c|py) :func:" ,
48
+ "(?<!py) :meth:" ,
49
+ "(?<!:py) :mod:" ,
50
50
":exc:" ,
51
51
":issue:" ,
52
52
":attr:" ,
53
53
":c:func:" ,
54
54
":ref:" ,
55
55
":const:" ,
56
56
":term:" ,
57
- ":data:" ,
57
+ "(?<!:c|py) :data:" ,
58
58
":keyword:" ,
59
59
":file:" ,
60
60
":pep:" ,
128
128
# :const:`None`
129
129
role_with_no_backticks = re .compile (r"%s[^` ]" % all_roles )
130
130
131
+ # Find role glued with another word like:
132
+ # the:c:func:`PyThreadState_LeaveTracing` function.
133
+ # instad of:
134
+ # the :c:func:`PyThreadState_LeaveTracing` function.
135
+ role_glued_with_word = re .compile (r"[a-zA-Z]%s" % all_roles )
131
136
132
137
default_role_re = re .compile (r"(^| )`\w([^`]*?\w)?`($| )" )
133
138
leaked_markup_re = re .compile (r"[a-z]::\s|`|\.\.\s*\w+:" )
@@ -176,6 +181,8 @@ def check_suspicious_constructs(fn, lines):
176
181
yield lno , "role use a single backtick, double backtick found."
177
182
if role_with_no_backticks .search (line ):
178
183
yield lno , "role use a single backtick, no backtick found."
184
+ if role_glued_with_word .search (line ):
185
+ yield lno , "missing space before role"
179
186
if ".. productionlist::" in line :
180
187
inprod = True
181
188
elif not inprod and default_role_re .search (line ):
You can’t perform that action at this time.
0 commit comments