forked from PyCQA/pydocstyle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
capitalization.py
60 lines (36 loc) · 1.23 KB
/
capitalization.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""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("D419: Docstring is empty")
def empty_docstring():
""""""
def all_caps():
"""GET the request."""
def non_letter_characters():
"""Create/Edit the doodli-do."""
def more_non_letter_characters():
"""(Un)register the user."""
def even_more_non_letter():
"""'laser' the planet."""
def dash():
"""git-push it."""
def digit_in_word():
"""sha1 the string."""
@expect("D403: First word of the first line should be properly capitalized "
"(\"Don't\", not \"Don'T\")")
def partial_caps():
"""Don'T do that."""
@expect("D403: First word of the first line should be properly capitalized "
"('Return', not 'ReTurn')")
def more_partial_caps():
"""ReTurn the field."""
@expect("D403: First word of the first line should be properly capitalized "
"('Generate', not 'generate')")
def just_one_more_example():
"""generate a function."""