pydocstringformatter
pydocstringformatter copied to clipboard
Add check for variable name or non word that should be inside quote
Syntax checkers do not like variable name inside sentences. Humans can manage, but it's still harder to read. So string like this: should be inside quote:
def func(named_parameter: str, other, word) -> None:
"""named_parameter should have a nice name
Other information here, if there's no underscore in it it's a normal word.
"""
print(named_parameter)
- """named_parameter should have a nice name
+ """'named_parameter' should have a nice name
👍
As I said in this https://github.com/DanielNoord/pydocstringformatter/pull/8#discussion_r777461817 I do think this should be optional though as there is no basis in any of the PEP's and I think those should be the guidelines for the tool's standard behaviour.
Something like --quote-argument-names
.