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

False positives for multiline strings #23

Closed
phihag opened this issue Jan 11, 2017 · 2 comments
Closed

False positives for multiline strings #23

phihag opened this issue Jan 11, 2017 · 2 comments

Comments

@phihag
Copy link

phihag commented Jan 11, 2017

I have a file with the content

s = (
    'this' +
    'is a string'
)
print(s)

and another with

s = (
    'this'
    'is a string'
)
print(s)

Both files emit a warning

t.py:3:18: C812 missing trailing comma

This warning dangerous, since actually adding a comma changes the meaning of the statement!

@graingert
Copy link
Member

@phihag fixed in 0.2.0

graingert added a commit that referenced this issue Jan 13, 2017
graingert added a commit that referenced this issue Jan 13, 2017
@bear24rw
Copy link

Would it be possible to add an optional check to flag multiline strings as errors? In my code base we never use multiline strings and I would like to catch missing commas in lists.

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

3 participants