-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathlist_patterns.toml
More file actions
192 lines (162 loc) · 3.84 KB
/
list_patterns.toml
File metadata and controls
192 lines (162 loc) · 3.84 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[is_bullet_list]
instring = """* parameter\n
- parameter\n
+ parameter\n"""
strict = false
style = "sphinx"
expected = true
[is_enum_list]
instring = """1. parameter\n
2. parameter\n
3. parameter\n"""
strict = false
style = "sphinx"
expected = true
[is_option_list]
instring = """
-a include all the stuff\n
--config the path to the configuration file\n
-h, --help show this help\n"""
strict = false
style = "sphinx"
expected = true
[is_option_list_indented]
instring = """
-a include all the stuff\n
--config the path to the configuration file\n
-h, --help show this help\n"""
strict = false
style = "sphinx"
expected = true
[is_list_with_single_hyphen]
instring = """\
Keyword arguments:
real - the real part (default 0.0)
imag - the imaginary part (default 0.0)
"""
strict = false
style = "sphinx"
expected = true
[is_list_with_double_hyphen]
instring = """\
Keyword arguments:
real -- the real part (default 0.0)
imag -- the imaginary part (default 0.0)
"""
strict = false
style = "sphinx"
expected = true
[is_list_with_at_sign]
instring = """\
Keyword arguments:
@real the real part (default 0.0)
@imag the imaginary part (default 0.0)
"""
strict = false
style = "sphinx"
expected = true
[is_heuristic_list]
instring = "Example:\nrelease-1.1/\nrelease-1.2/\nrelease-1.3/\nrelease-1.4/\nrelease-1.4.1/\nrelease-1.5/\n"
strict = false
style = "sphinx"
expected = true
[is_type_of_list_strict_wrap]
instring = "Launch\nthe\nrocket."
strict = true
style = "numpy"
expected = false
[is_type_of_list_non_strict_wrap] # See issue #67.
instring = "Launch\nthe\nrocket."
strict = false
style = "numpy"
expected = true
[is_type_of_list_alembic_header] # See issue #242.
instring = """Add some column.
Revision ID: <some id>>
Revises: <some other id>
Create Date: 2023-01-06 10:13:28.156709
"""
strict = false
style = "numpy"
expected = true
[is_not_list_sphinx_style] # See requirement docformatter_10.4
instring = """\
Using Sphinx parameter list
:param str arg1: the first argument.
:param int arg2: the second argument.
"""
strict = false
style = "sphinx"
expected = false
[is_sphinx_list_numpy_style] # See requirements docformatter_10.2.1 and docformatter_10.3.1
instring = """\
Using Sphinx parameter list
:param str arg1: the first argument.
:param int arg2: the second argument.
"""
strict = false
style = "numpy"
expected = true
[is_numpy_list_sphinx_style] # See requirement docformatter_10.4.1
instring = """\
Using Numpy parameter list
Parameters
----------
arg1 : str
The first argument.
arg2 : int
The second argument.
"""
strict = false
style = "sphinx"
expected = false # Changed from true: NumPy sections in Sphinx docs should be preserved, not skip wrapping
[is_google_list_numpy_style]
instring = """\
Args:
stream (BinaryIO): Binary stream (usually a file object).
"""
strict = true
style = "numpy"
expected = true
[is_literal_block]
instring = """\
This is a description.
Example code::
config(par=value)
Example code2::
with config(par=value) as f:
pass
"""
strict = false
style = "numpy"
expected = true
[is_reST_header]
instring = """\
===============================
Example of creating an example.
===============================
.. currentmodule:: my_project
In this example, we illustrate how to create
an example.
"""
strict = false
style = "numpy"
expected = true
[is_sphinx_field_list]
instring = """\
This is a description.
:parameter arg1: the first argument.
:parameter arg2: the second argument.
"""
strict = false
style = "sphinx"
expected = false
[is_epytext_field_list]
instring = """\
This is a description.
@param arg1: the first argument.
@param arg2: the second argument.
"""
strict = false
style = "epytext"
expected = false