Skip to content

Commit f92a007

Browse files
authored
Include C construct directives for RST checks (#109)
1 parent 78e818a commit f92a007

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist/
33
__pycache__/
44
*.egg-info/
55
.coverage
6+
.coverage.*
67
.envrc
78
.tox/
89
.venv/

sphinxlint/rst.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@
6161
# fmt: off
6262
DIRECTIVES_CONTAINING_RST = [
6363
# standard docutils ones
64-
'admonition', 'attention', 'caution', 'class', 'compound', 'container',
64+
'admonition', 'attention',
65+
'c:data', 'c:enum', 'c:enumerator', 'c:func', 'c:macro', 'c:member',
66+
'c:struct', 'c:type', 'c:union', 'c:var',
67+
'caution', 'class', 'compound', 'container',
6568
'danger', 'epigraph', 'error', 'figure', 'footer', 'header', 'highlights',
6669
'hint', 'image', 'important', 'include', 'line-block', 'list-table', 'meta',
6770
'note', 'parsed-literal', 'pull-quote', 'replace', 'sidebar', 'tip', 'topic',
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. expect: default role used (hint: for inline literals, use double backticks) (default-role)
2+
3+
.. c:type:: int (*PyCode_WatchCallback)(PyCodeEvent event, PyCodeObject* co)
4+
5+
If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked
6+
after `co` has been fully initialized. Otherwise, the callback is invoked
7+
before the destruction of *co* takes place, so the prior state of *co*
8+
can be inspected.

0 commit comments

Comments
 (0)