Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit dbbf578

Browse files
justinludwigNurdok
authored andcommitted
Remove D413 from the google convention (#430)
As none of the examples in the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html) show a docstring with an extra blank line at the end (see the [3.8.1 Docstrings](https://google.github.io/styleguide/pyguide.html#381-docstrings) section in particular), error D413 should be excluded from the default "google" convention. See #429 for a test case with examples from the Google Python Style Guide; see also #401 for D413 in relation to the "pep257" convention.
1 parent 96092cd commit dbbf578

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

docs/error_codes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The numpy convention checks for all of the above errors except for
2121
D107, D203, D212, D213, D402, D413, D415, D416 and D417.
2222

2323
The google convention checks for all of the above errors except for
24-
D203, D204, D213, D215, D400, D401, D404, D406, D407, D408 and D409.
24+
D203, D204, D213, D215, D400, D401, D404, D406, D407, D408, D409 and D413.
2525

2626
These conventions may be specified using `--convention=<name>` when
2727
running pydocstyle from the command line or by specifying the

docs/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ New Features
2323

2424
Bug Fixes
2525

26+
* Remove D413 from the google convention (#430).
2627
* Remove D413 from the pep257 convention (#404).
2728
* Replace `semicolon` with `colon` in D416 messages. (#409)
2829
* D301 (Use r""" if any backslashes in a docstring) does not trigger on

src/pydocstyle/violations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,5 @@ def __getattr__(self, item: str) -> Any:
270270
'numpy': all_errors - {'D107', 'D203', 'D212', 'D213', 'D402', 'D413',
271271
'D415', 'D416', 'D417'},
272272
'google': all_errors - {'D203', 'D204', 'D213', 'D215', 'D400', 'D401',
273-
'D404', 'D406', 'D407', 'D408', 'D409'}
273+
'D404', 'D406', 'D407', 'D408', 'D409', 'D413'}
274274
})

src/tests/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def __init__(self):
660660
assert 'D409' not in out
661661
assert 'D410' not in out
662662
assert 'D412' in out
663-
assert 'D413' in out
663+
assert 'D413' not in out
664664
assert 'D414' in out
665665
assert 'D417' in out
666666

0 commit comments

Comments
 (0)