forked from pytorch/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pyspelling.yml
121 lines (121 loc) · 3.61 KB
/
.pyspelling.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
spellchecker: aspell
matrix:
- name: python
sources:
- beginner_source/*.py
- intermediate_source/*.py
- advanced_source/*.py
- recipes_source/*/*.py
dictionary:
wordlists:
- en-wordlist.txt
pipeline:
- pyspelling.filters.python:
group_comments: true
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Exclude figure rST tags
- open: '\.\.\s+(figure|literalinclude|math|image|grid)::'
close: '\n'
# Exclude roles:
- open: ':(?:(class|py:mod|mod|func|meth|obj)):`'
content: '[^`]*'
close: '`'
# Exclude reStructuredText hyperlinks
- open: '\s'
content: '\w*'
close: '_'
# Exclude raw directive
- open: '\.\. (raw)::.*$\n*'
close: '\n'
# Exclude Python coding directives
- open: '-\*- coding:'
close: '\n'
# Exclude Authors:
- open: 'Author(|s):'
close: '\n'
# Exclude .rst directives:
- open: ':math:`.*`'
close: ' '
# Ignore multiline content in codeblock
- open: '(?s)^::\n\n '
close: '^\n'
# Ignore reStructuredText block directives
- open: '\.\. (code-block|math)::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
# Ignore references like "[1] Author: Title"
- open: '\[\d\]'
close: '\n'
- pyspelling.filters.markdown:
- pyspelling.filters.html:
ignores:
- code
- pre
- pyspelling.filters.url:
- name: reST
sources:
- beginner_source/*.rst
dictionary:
wordlists:
- en-wordlist.txt
pipeline:
- pyspelling.filters.text:
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Ignore text between inline back ticks
- open: '(div style|iframe).*'
close: '\n'
- open: '(- )?(?P<open>`+)'
close: '(?P=open)'
- open: ':figure:.*'
close: '\n'
# Ignore reStructuredText roles
- open: ':(?:(class|file|func|math|ref|octicon|meth|obj)):`'
content: '[^`]*'
close: '`'
- open: ':width:'
close: '$'
# Exclude raw directive
- open: '\.\. (raw|grid-item-card|galleryitem|includenodoc)::.*$\n*'
close: '\n'
# Ignore reStructuredText literals
- open: '::$'
close: '(?P<literal>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText hyperlinks
- open: '\s'
content: '\w*'
close: '_'
# Ignore hyperlink in the DDP tutorials
- open: '`.*'
close: '`__'
# Ignore reStructuredText header ---
- open: '^'
content: '--*'
close: '$'
# Ignore reStructuredText header '''
- open: '^'
content: '''''*'
close: '$'
# Ignore reStructuredText block directives
- open: '\.\. (code-block|math|table)::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
- open: '\.\. (raw)::.*$\n*'
close: '^\s*$'
# Ignore reStructuredText substitution definitions
- open: '^\.\. \|[^|]+\|'
close: '$'
# Ignore reStructuredText substitutions
- open: '\|'
content: '[^|]*'
close: '\|_?'
# Ignore reStructuredText toctree
- open: '\.\.\s+toctree::'
close: '(?P<toctree>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore directives
- open: '\.\.\s+(image|include|only)::'
close: '$'
- pyspelling.filters.url: