Lines Matching +full:python3 +full:- +full:docutils
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
9 # TODO: - wrong versions in versionadded/changed
10 # - wrong markup after versionchanged directive
21 # standard docutils ones
23 'contents', 'csv-table', 'danger', 'date', 'default-role', 'epigraph',
25 'important', 'include', 'line-block', 'list-table', 'meta', 'note',
26 'parsed-literal', 'pull-quote', 'raw', 'replace',
27 'restructuredtext-test-directive', 'role', 'rubric', 'sectnum', 'sidebar',
28 'table', 'target-notes', 'tip', 'title', 'topic', 'unicode', 'warning',
33 'cmdoption', 'cmember', 'code-block', 'confval', 'cssclass', 'ctype',
35 'deprecated-removed', 'deprecated(?!-removed)', 'describe', 'directive',
37 'highlight', 'highlightlang', 'impl-detail', 'index', 'literalinclude',
46 seems_directive_re = re.compile(r'(?<!\.)\.\. %s([^a-z:]|:(?!:))' % all_directives)
48 leaked_markup_re = re.compile(r'[a-z]::\s|`|\.\.\s*\w+:')
104 if line[:-1].rstrip(' \t') != line[:-1]:
153 if re.match(r'\.\. \[[0-9]+\] ', line):
187 r"""Check for missing 'backslash-space' between a code sample a letter.
199 yield lno + 1, f"Missing backslash-space between code sample and {token!r}."
201 if token_no == len(tokens) - 1:
209 Usage: %s [-v] [-f] [-s sev] [-i path]* [path]
211 Options: -v verbose (print all checked file names)
212 -f enable checkers that yield many false positives
213 -s sev only show problems with severity >= sev
214 -i path ignore subdir or file path
227 if opt == '-v':
229 elif opt == '-f':
231 elif opt == '-s':
233 elif opt == '-i':
274 with open(fn, 'r', encoding='utf-8') as f: