pydocstringformatter icon indicating copy to clipboard operation
pydocstringformatter copied to clipboard

Add check for variable name or non word that should be inside quote

Open Pierre-Sassoulas opened this issue 3 years ago • 1 comments

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

Pierre-Sassoulas avatar Jan 03 '22 14:01 Pierre-Sassoulas

👍

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.

DanielNoord avatar Jan 03 '22 14:01 DanielNoord