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

Commit e1e84c3

Browse files
jcb91Nurdok
authored andcommitted
[DOCONLY] Fix misnamed D416 reference: s/semicolon/colon/g (#409)
* Fix misnamed D416 reference: `s/semicolon/colon/g` * Add release note line
1 parent fec1b89 commit e1e84c3

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

docs/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ New Features
1919
Bug Fixes
2020

2121
* Remove D413 from the pep257 convention (#404).
22+
* Replace `semicolon` with `colon` in D416 messages. (#409)
2223

2324
4.0.1 - August 14th, 2019
2425
-------------------------

src/pydocstyle/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def _check_google_section(cls, docstring, definition, context):
706706
* The section does not contain any blank line between its name
707707
and content (D412).
708708
* The section is not empty (D414).
709-
* The section name has semicolon as a suffix (D416).
709+
* The section name has colon as a suffix (D416).
710710
711711
Additionally, also yield all violations from `_check_common_section`
712712
which are style-agnostic section checks.

src/pydocstyle/violations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def to_rst(cls) -> str:
250250
D414 = D4xx.create_error('D414', 'Section has no content', '{0!r}')
251251
D415 = D4xx.create_error('D415', 'First line should end with a period, question '
252252
'mark, or exclamation point', 'not {0!r}')
253-
D416 = D4xx.create_error('D416', 'Section name should end with a semicolon',
253+
D416 = D4xx.create_error('D416', 'Section name should end with a colon',
254254
'{0!r}, not {1!r}')
255255
D417 = D4xx.create_error('D417', 'Missing arguments in the docstring',
256256
'argument(s) {0!r} missing in {1!r} docstring')

src/tests/test_cases/sections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def valid_google_style_section(): # noqa: D406, D407
263263

264264

265265
@expect(_D213)
266-
@expect("D416: Section name should end with a semicolon "
266+
@expect("D416: Section name should end with a colon "
267267
"('Args:', not 'Args')")
268268
def missing_colon_google_style_section(): # noqa: D406, D407
269269
"""Toggle the gizmo.

0 commit comments

Comments
 (0)