Skip to content

Commit df6c15c

Browse files
committed
Make validation error mapping easier to read.
1 parent fd9b078 commit df6c15c

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

doc/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ issues.
2121
Built-in Validation Checks
2222
--------------------------
2323

24-
The `~numpydoc.validation` module provides a mapping with all of the checks
24+
The ``numpydoc.validation`` module provides a mapping with all of the checks
2525
that are run as part of the validation procedure.
2626
The mapping is of the form: ``error_code : <explanation>`` where ``error_code``
2727
provides a shorthand for the check being run, and ``<explanation>`` provides

numpydoc/validate.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,58 @@
3434
]
3535
ERROR_MSGS = {
3636
"GL01": "Docstring text (summary) should start in the line immediately "
37-
"after the opening quotes (not in the same line, or leaving a "
38-
"blank line in between)",
37+
"after the opening quotes (not in the same line, or leaving a "
38+
"blank line in between)",
3939
"GL02": "Closing quotes should be placed in the line after the last text "
40-
"in the docstring (do not close the quotes in the same line as "
41-
"the text, or leave a blank line between the last text and the "
42-
"quotes)",
40+
"in the docstring (do not close the quotes in the same line as "
41+
"the text, or leave a blank line between the last text and the "
42+
"quotes)",
4343
"GL03": "Double line break found; please use only one blank line to "
44-
"separate sections or paragraphs, and do not leave blank lines "
45-
"at the end of docstrings",
44+
"separate sections or paragraphs, and do not leave blank lines "
45+
"at the end of docstrings",
4646
"GL05": 'Tabs found at the start of line "{line_with_tabs}", please use '
47-
"whitespace only",
47+
"whitespace only",
4848
"GL06": 'Found unknown section "{section}". Allowed sections are: '
49-
"{allowed_sections}",
49+
"{allowed_sections}",
5050
"GL07": "Sections are in the wrong order. Correct order is: {correct_sections}",
5151
"GL08": "The object does not have a docstring",
5252
"GL09": "Deprecation warning should precede extended summary",
5353
"GL10": "reST directives {directives} must be followed by two colons",
5454
"SS01": "No summary found (a short summary in a single line should be "
55-
"present at the beginning of the docstring)",
55+
"present at the beginning of the docstring)",
5656
"SS02": "Summary does not start with a capital letter",
5757
"SS03": "Summary does not end with a period",
5858
"SS04": "Summary contains heading whitespaces",
5959
"SS05": "Summary must start with infinitive verb, not third person "
60-
'(e.g. use "Generate" instead of "Generates")',
60+
'(e.g. use "Generate" instead of "Generates")',
6161
"SS06": "Summary should fit in a single line",
6262
"ES01": "No extended summary found",
6363
"PR01": "Parameters {missing_params} not documented",
6464
"PR02": "Unknown parameters {unknown_params}",
6565
"PR03": "Wrong parameters order. Actual: {actual_params}. "
66-
"Documented: {documented_params}",
66+
"Documented: {documented_params}",
6767
"PR04": 'Parameter "{param_name}" has no type',
6868
"PR05": 'Parameter "{param_name}" type should not finish with "."',
6969
"PR06": 'Parameter "{param_name}" type should use "{right_type}" instead '
70-
'of "{wrong_type}"',
70+
'of "{wrong_type}"',
7171
"PR07": 'Parameter "{param_name}" has no description',
7272
"PR08": 'Parameter "{param_name}" description should start with a '
73-
"capital letter",
73+
"capital letter",
7474
"PR09": 'Parameter "{param_name}" description should finish with "."',
7575
"PR10": 'Parameter "{param_name}" requires a space before the colon '
76-
"separating the parameter name and type",
76+
"separating the parameter name and type",
7777
"RT01": "No Returns section found",
7878
"RT02": "The first line of the Returns section should contain only the "
79-
"type, unless multiple values are being returned",
79+
"type, unless multiple values are being returned",
8080
"RT03": "Return value has no description",
8181
"RT04": "Return value description should start with a capital letter",
8282
"RT05": 'Return value description should finish with "."',
8383
"YD01": "No Yields section found",
8484
"SA01": "See Also section not found",
8585
"SA02": "Missing period at end of description for See Also "
86-
'"{reference_name}" reference',
86+
'"{reference_name}" reference',
8787
"SA03": "Description should be capitalized for See Also "
88-
'"{reference_name}" reference',
88+
'"{reference_name}" reference',
8989
"SA04": 'Missing description for See Also "{reference_name}" reference',
9090
"EX01": "No examples section found",
9191
}

0 commit comments

Comments
 (0)