Use single quotes for non-docstring triple-quoted strings
ThiefMaster opened this issue · 3 comments
ThiefMaster commented
While docstrings should absolutely use """
(already the case in both black and axblack), there are also triple-quoted strings which aren't docstrings.
It would be nice if those were changed to triple-single-quotes.
For example, this snippet:
def get_sql():
'''Get a dummy SQL statement.'''
stmt = """
SELECT *
FROM foo
WHERE bar;
"""
return stmt
should be formatted like this:
def get_sql():
"""Get a dummy SQL statement."""
stmt = '''
SELECT *
FROM foo
WHERE bar;
'''
return stmt
axgkl commented
Hi, so sorry - crazy year, totally overlooked this one. You are 100% right regarding what's better, have pushed a new version to git and pypi.
Can you close if ok 4u?
axgkl commented
sounds like ok ;-)
ThiefMaster commented
hadn't seen the question ;) but yes, looks good!