Skip to content

Commit

Permalink
Remove D413 from the google convention
Browse files Browse the repository at this point in the history
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 PyCQA#429 for a test case with examples from the Google Python Style
Guide; see also PyCQA#401 for D413 in relation to the "pep257" convention.
  • Loading branch information
justinludwig committed Nov 26, 2019
1 parent 667d9be commit f105d4a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/error_codes.rst
Expand Up @@ -21,7 +21,7 @@ The numpy convention checks for all of the above errors except for
D107, D203, D212, D213, D402, D413, D415, D416 and D417.

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

These conventions may be specified using `--convention=<name>` when
running pydocstyle from the command line or by specifying the
Expand Down
1 change: 1 addition & 0 deletions docs/release_notes.rst
Expand Up @@ -22,6 +22,7 @@ New Features

Bug Fixes

* Remove D413 from the google convention (#430).
* Remove D413 from the pep257 convention (#404).
* Replace `semicolon` with `colon` in D416 messages. (#409)
* D301 (Use r""" if any backslashes in a docstring) does not trigger on
Expand Down
2 changes: 1 addition & 1 deletion src/pydocstyle/violations.py
Expand Up @@ -270,5 +270,5 @@ def __getattr__(self, item: str) -> Any:
'numpy': all_errors - {'D107', 'D203', 'D212', 'D213', 'D402', 'D413',
'D415', 'D416', 'D417'},
'google': all_errors - {'D203', 'D204', 'D213', 'D215', 'D400', 'D401',
'D404', 'D406', 'D407', 'D408', 'D409'}
'D404', 'D406', 'D407', 'D408', 'D409', 'D413'}
})
2 changes: 1 addition & 1 deletion src/tests/test_integration.py
Expand Up @@ -650,7 +650,7 @@ def __init__(self):
assert 'D409' not in out
assert 'D410' not in out
assert 'D412' in out
assert 'D413' in out
assert 'D413' not in out
assert 'D414' in out
assert 'D417' in out

Expand Down

0 comments on commit f105d4a

Please sign in to comment.