|
21 | 21 | ' ).' |
22 | 22 | ), |
23 | 23 | 104: ( |
24 | | - 'Arguments are the same in the docstring and the function signature,' |
25 | | - ' but are in a different order.' |
| 24 | + 'Arguments are the same in the docstring and the function' |
| 25 | + ' signature, but are in a different order.' |
26 | 26 | ), |
27 | | - 105: 'Argument names match, but type hints in these args do not match:', |
| 27 | + 105: ('Argument names match, but type hints in these args do not match:'), |
28 | 28 | 106: ( |
29 | | - 'The option `--arg-type-hints-in-signature` is `True` but there are' |
30 | | - ' no argument type hints in the signature' |
| 29 | + 'The option `--arg-type-hints-in-signature` is `True` but' |
| 30 | + ' there are no argument type hints in the signature' |
31 | 31 | ), |
32 | 32 | 107: ( |
33 | 33 | 'The option `--arg-type-hints-in-signature` is `True` but not all' |
34 | 34 | ' args in the signature have type hints' |
35 | 35 | ), |
36 | 36 | 108: ( |
37 | | - 'The option `--arg-type-hints-in-signature` is `False` but there are' |
38 | | - ' argument type hints in the signature' |
| 37 | + 'The option `--arg-type-hints-in-signature` is `False` but' |
| 38 | + ' there are argument type hints in the signature' |
39 | 39 | ), |
40 | 40 | 109: ( |
41 | | - 'The option `--arg-type-hints-in-docstring` is `True` but there are' |
42 | | - ' no type hints in the docstring arg list' |
| 41 | + 'The option `--arg-type-hints-in-docstring` is `True` but' |
| 42 | + ' there are no type hints in the docstring arg list' |
43 | 43 | ), |
44 | 44 | 110: ( |
45 | 45 | 'The option `--arg-type-hints-in-docstring` is `True` but not all' |
46 | 46 | ' args in the docstring arg list have type hints' |
47 | 47 | ), |
48 | 48 | 111: ( |
49 | | - 'The option `--arg-type-hints-in-docstring` is `False` but there are' |
50 | | - ' type hints in the docstring arg list' |
| 49 | + 'The option `--arg-type-hints-in-docstring` is `False` but' |
| 50 | + ' there are type hints in the docstring arg list' |
51 | 51 | ), |
52 | 52 | 201: 'does not have a return section in docstring', |
53 | 53 | 202: ( |
|
59 | 59 | ' annotation.' |
60 | 60 | ), |
61 | 61 | 301: ( |
62 | | - '__init__() should not have a docstring; please combine it with the' |
63 | | - ' docstring of the class' |
| 62 | + '__init__() should not have a docstring; please combine it' |
| 63 | + ' with the docstring of the class' |
64 | 64 | ), |
65 | 65 | 302: ( |
66 | 66 | 'The class docstring does not need a "Returns" section, because' |
67 | 67 | ' __init__() cannot return anything' |
68 | 68 | ), |
69 | 69 | 303: ( |
70 | | - 'The __init__() docstring does not need a "Returns" section, because' |
71 | | - ' it cannot return anything' |
| 70 | + 'The __init__() docstring does not need a "Returns" section,' |
| 71 | + ' because it cannot return anything' |
72 | 72 | ), |
73 | 73 | 304: ( |
74 | | - 'Class docstring has an argument/parameter section; please put it in' |
75 | | - ' the __init__() docstring' |
| 74 | + 'Class docstring has an argument/parameter section; please' |
| 75 | + ' put it in the __init__() docstring' |
76 | 76 | ), |
77 | 77 | 305: ( |
78 | 78 | 'Class docstring has a "Raises" section; please put it in the' |
|
83 | 83 | ' __init__() cannot yield anything' |
84 | 84 | ), |
85 | 85 | 307: ( |
86 | | - 'The __init__() docstring does not need a "Yields" section, because' |
87 | | - ' __init__() cannot yield anything' |
| 86 | + 'The __init__() docstring does not need a "Yields" section,' |
| 87 | + ' because __init__() cannot yield anything' |
88 | 88 | ), |
89 | 89 | 401: '', # Deprecated |
90 | 90 | 402: ( |
91 | | - 'has "yield" statements, but the docstring does not have a "Yields"' |
92 | | - ' section' |
| 91 | + 'has "yield" statements, but the docstring does not have a' |
| 92 | + ' "Yields" section' |
93 | 93 | ), |
94 | 94 | 403: ( |
95 | 95 | 'has a "Yields" section in the docstring, but there are no "yield"' |
|
102 | 102 | ), |
103 | 103 | 405: ( |
104 | 104 | 'has both "return" and "yield" statements. Please use' |
105 | | - ' Generator[YieldType, SendType, ReturnType] as the return type' |
106 | | - ' annotation, and put your yield type in YieldType and return type' |
107 | | - ' in ReturnType. More details in' |
| 105 | + ' Generator[YieldType, SendType, ReturnType] as the' |
| 106 | + ' return type annotation, and put your yield type in' |
| 107 | + ' YieldType and return type in ReturnType. More details in' |
108 | 108 | ' https://jsh9.github.io/pydoclint/notes_generator_vs_iterator.html' |
109 | 109 | ), |
110 | 110 | 501: ( |
111 | | - 'has raise statements, but the docstring does not have a "Raises"' |
112 | | - ' section' |
| 111 | + 'has raise statements, but the docstring does not have a' |
| 112 | + ' "Raises" section' |
113 | 113 | ), |
114 | 114 | 502: ( |
115 | | - 'has a "Raises" section in the docstring, but there are not "raise"' |
116 | | - ' statements in the body' |
| 115 | + 'has a "Raises" section in the docstring, but there are not' |
| 116 | + ' "raise" statements in the body' |
117 | 117 | ), |
118 | 118 | 503: ( |
119 | 119 | 'exceptions in the "Raises" section in the docstring do not match' |
120 | 120 | ' those in the function body.' |
121 | 121 | ), |
122 | 122 | 504: ( |
123 | | - 'has assert statements, but the docstring does not have a "Raises"' |
124 | | - ' section. (Assert statements could raise "AssertError".)' |
| 123 | + 'has assert statements, but the docstring does not have a' |
| 124 | + ' "Raises" section. (Assert statements could raise' |
| 125 | + ' "AssertError".)' |
125 | 126 | ), |
126 | 127 | 601: ( |
127 | | - 'Class docstring contains fewer class attributes than actual class' |
128 | | - ' attributes.' |
| 128 | + 'Class docstring contains fewer class attributes than actual' |
| 129 | + ' class attributes.' |
129 | 130 | ), |
130 | 131 | 602: ( |
131 | | - 'Class docstring contains more class attributes than in actual class' |
132 | | - ' attributes.' |
| 132 | + 'Class docstring contains more class attributes than in actual' |
| 133 | + ' class attributes.' |
133 | 134 | ), |
134 | 135 | 603: ( |
135 | 136 | 'Class docstring attributes are different from actual class' |
136 | 137 | ' attributes.' |
137 | 138 | ' (Or could be other formatting issues: ' |
138 | | - 'https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103' |
139 | | - ' ).' |
| 139 | + 'https://jsh9.github.io/pydoclint/violation_codes.html' |
| 140 | + '#notes-on-doc103 ).' |
140 | 141 | ), |
141 | 142 | 604: ( |
142 | 143 | 'Attributes are the same in docstring and class def, but are in a' |
143 | 144 | ' different order.' |
144 | 145 | ), |
145 | 146 | 605: ( |
146 | | - 'Attribute names match, but type hints in these attributes do not' |
147 | | - ' match:' |
| 147 | + 'Attribute names match, but type hints in these' |
| 148 | + ' attributes do not match:' |
| 149 | + ), |
| 150 | + 606: ( |
| 151 | + 'Attribute has an inline docstring, but should be documented in' |
| 152 | + ' the class docstring instead.' |
| 153 | + ), |
| 154 | + 607: ( |
| 155 | + 'The class docstring does not need an "Attributes" section,' |
| 156 | + ' because the class attributes are documented inline.' |
148 | 157 | ), |
149 | 158 | }) |
150 | 159 |
|
|
0 commit comments