pydocstyle
pydocstyle copied to clipboard
D403 does not like Camelcase words
Is it by design that Pydocstyle intentionally blocks first words that are camelcase terms? For example,
D403: First word of the first line should be properly capitalized ('Datastore', not 'DataStore')
In this case, the term is referring to a DataStore
object, so having it recommend Datastore
would be incongruent with the object name.
One more example is PostgreSQL
which looks completely broken when spelled like Postgresql
.
Isn't D403 for method/function signatures? Shouldn't the first word be imperative anyway? Datastore
and PostgreSQL
aren't imperative verbs.
FWIW, I hit this in a test module...
"""Reproduce https://github.com/PyCQA/pydocstyle/issues/413."""
def test_func():
"""MyCustomError mentions "foo" when str()'d."""
sscce.py:5 in public function `test_func`:
D403: First word of the first line should be properly capitalized ('Mycustomerror', not 'MyCustomError')
Not sure how to make that imperative without making every test docstring start with "Ensure" or "Verify" :thinking:
Mention "foo" when MyCustomError is str()'d.
I think that docstring is better for MyCustomError.__str__
than the test :yum: