This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from Nurdok/D403
Added D403: First word of first line should be properly capitalized
- Loading branch information
Showing
6 changed files
with
97 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""A valid module docstring.""" | ||
|
||
from .expected import Expectation | ||
|
||
expectation = Expectation() | ||
expect = expectation.expect | ||
|
||
|
||
@expect("D403: First word of the first line should be properly capitalized " | ||
"('Do', not 'do')") | ||
def not_capitalized(): | ||
"""do something.""" | ||
|
||
|
||
# Make sure empty docstrings don't generate capitalization errors. | ||
@expect("D103: Missing docstring in public function") | ||
def empty_docstring(): | ||
"""""" | ||
|
||
|
||
@expect("D403: First word of the first line should be properly capitalized " | ||
"('Get', not 'GET')") | ||
def all_caps(): | ||
"""GET the request.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Check for a bug in parsing comments after definitions.""" | ||
|
||
from .expected import Expectation | ||
|
||
expectation = Expectation() | ||
expect = expectation.expect | ||
|
||
|
||
def should_be_ok(): | ||
"""Just a function without violations.""" | ||
|
||
|
||
# This is a comment that triggers a bug that causes the previous function | ||
# to generate a D202 error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters