forked from pytorch/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pyspelling.yml
163 lines (163 loc) · 4.52 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
spellchecker: aspell
matrix:
- name: python
sources:
- "**/*.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:
- "**/*.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:
- name: markdown
sources:
- '**/*.md'
dictionary:
wordlists:
- en-wordlist.txt
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- markdown.extensions.admonition:
- markdown.extensions.codehilite:
- markdown.extensions.meta:
- markdown.extensions.tables:
- markdown.extensions.toc:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
- tt
- img
- a
- table
- thead
- tbody
- th
- tr
- td
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Ignore code blocks
- open: '```[a-z]*\n'
close: '```\n'
# Ignore inline code
- open: '`'
close: '`'
# Ignore links
- open: '\[([^]]*)\]'
close: '\([^)]*\)'
# Ignore HTML comments
- open: '<!--'
close: '-->'
- pyspelling.filters.url: