Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single quotes for non-docstring triple-quoted strings #6

Closed
ThiefMaster opened this issue Aug 15, 2020 · 3 comments
Closed

Use single quotes for non-docstring triple-quoted strings #6

ThiefMaster opened this issue Aug 15, 2020 · 3 comments

Comments

@ThiefMaster
Copy link

ThiefMaster commented Aug 15, 2020

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
Copy link
Member

axgkl commented Oct 9, 2020

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
Copy link
Member

axgkl commented Oct 15, 2020

sounds like ok ;-)

@axgkl axgkl closed this as completed Oct 15, 2020
@ThiefMaster
Copy link
Author

hadn't seen the question ;) but yes, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants