-
Notifications
You must be signed in to change notification settings - Fork 151
/
.pyspelling.yml
151 lines (150 loc) · 5.39 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
spellchecker: hunspell
matrix:
- name: python
sources:
- fipy/**/*.py
- examples/**/*.py
dictionary:
wordlists:
- .en-custom.txt
pipeline:
- pyspelling.filters.python:
comments: false
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```
# content
# ```
- open: '(?s)^(?P<open> *`{3,})$'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
close: '(?P=open)'
# Ignore doctest blocks
# Source consists of a PS1 line followed by zero or more PS2 lines.
# Want consists of any non-blank lines that do not start with PS1.
# Adapted from doctest.py: DocTestParser._EXAMPLE_RE
- open: '(?P<source>(?:^(?P<indent>[ ]*)>>> .*)(?:\n(?=P<indent>)\.\.\. .*)*)\n?'
content: ''
close: '(?P<want>(?:(?![ ]*$)(?![ ]*>>> ).*$\n?)*)'
# Ignore reStructuredText roles
- open: ':(?:(attr|class|envvar|eq|exc|func|meth|math|mod|py:attr)):`'
content: '[^`]*'
close: '`'
# Ignore reStructuredText literals
- open: '::$'
close: '(?P<literal>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText math directive
- open: '\.\. math::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
# Ignore reStructuredText directives
- open: '\.\.\s+(image|literalinclude|tabularcolumns)::'
close: '\n'
# Ignore reStructuredText bibmissing
- open: '\.\. \.\.\s+bibmissing::'
close: '\n'
# Ignore reStructuredText index
- open: '\.\.\s+index::'
close: '(?P<indexing>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText hyperlinks
- open: '\s'
content: '\w*'
close: '_'
# Ignore reStructredText hyperlink target
- open: '\.\.[ \t]+_[^:]*:'
close: '$'
# Ignore positive and negative numbers
- open: '\s'
content: '[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?'
close: '\s'
# Ignore NumPy docstring Parameters
- open: '(^(?P<indent>[ \t]*)Parameters\n)(^(?P=indent)----------\n)'
content: '^(?P=indent)(.*\n)*'
close: '(^[ \t]*$)'
# Ignore NumPy docstring Returns
- open: '(^(?P<indent>[ \t]*)Returns\n)(^(?P=indent)-------\n)'
content: '^(?P=indent)(.*\n)*'
close: '(^[ \t]*$)'
# Ignore NumPy docstring See Also
- open: '(^(?P<indent>[ \t]*)See Also\n)(^(?P=indent)--------\n)'
content: '^(?P=indent)(.*\n)*'
close: '(^[ \t]*$)'
- pyspelling.filters.url:
- name: reST
sources:
- ./**/*.rst|!./**/generated/*.rst|!./test-environment-*/**|!./worktrees/**
dictionary:
wordlists:
- .en-custom.txt
pipeline:
- pyspelling.filters.text:
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Ignore text between inline back ticks
- open: '(- )?(?P<open>`+)'
close: '(?P=open)'
# Ignore doctest blocks
# Source consists of a PS1 line followed by zero or more PS2 lines.
# Want consists of any non-blank lines that do not start with PS1.
# Adapted from doctest.py: DocTestParser._EXAMPLE_RE
- open: '(?P<source>(?:^(?P<indent>[ ]*)>>> .*)(?:\n(?=P<indent>)\.\.\. .*)*)\n?'
content: ''
close: '(?P<want>(?:(?![ ]*$)(?![ ]*>>> ).*$\n?)*)'
# Ignore reStructuredText roles
- open: ':(?:(attr|cite|class|command|envvar|eq|file|func|math|meth|mod|ref|samp)):`'
content: '[^`]*'
close: '`'
# Ignore reStructuredText literals
- open: '::$'
close: '(?P<literal>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText hyperlinks
- open: '\s'
content: '\w*'
close: '_'
# Ignore reStructredText hyperlink target
- open: '\.\.[ \t]+_[^:]*:'
close: '$'
# Ignore reStructuredText header ---
- open: '^'
content: '--*'
close: '$'
# Ignore reStructuredText header '''
- open: '^'
content: '''''*'
close: '$'
# Ignore reStructuredText block directives
- open: '\.\. (code-block|math)::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
# 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 reStructuredText autosummary
- open: '\.\.\s+autosummary::'
close: '(?P<autosummary>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText directives
- open: '\.\.\s+(automodule|cmdoption|currentmodule|envvar|image|include|only)::'
close: '$'
# Ignore mailto
- open: '<mailto:'
close: '>'
# Ignore reStructuredText comments
- open: '\.\.\s+.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
# Ignore templates
- open: '{{'
content: '[^}]*'
close: '}}'
- pyspelling.filters.url: