-
Notifications
You must be signed in to change notification settings - Fork 750
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
No warning about missing space between closing parenthesis and keyword #371
Comments
Missing space between keyword and opening parenthesis doesn't raise warning too.
|
The following does not raise any warnings:
where as the following does:
|
What versions of pep8 are all of you using? |
The problem I mentioned exists in version 1.6.2 |
@OswinNathanial , pep8 is very clear about consistent spacing around operators, but is lax about one versus zero spaces. "If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies). Use your own judgment; however, never use more than one space, and always have the same amount of whitespace on both sides of a binary operator." @methane, your case is not covered by the above, and I cant find anything explicitly rejecting that syntax in pep8. I've forked that off to be #570, as it is a bit of a mine field of vague and unspecified implied styles. Regarding the original issue, pep8 guideline is very clear about spaces around "Always surround these binary operators with a single space on either side: assignment ( = ), augmented assignment ( += , -= etc.), comparisons ( == , < , > , != , <> , <= , >= , in , not in , is , is not ), Booleans ( and , or , not ). " And I can confirm that is not checked in the latest pycodestyle. |
#631 includes another few cases for this: [(a,)for a in y] from .import bar try:
...
except(IOError,):
... |
#570 also contains some cases for this as well with |
#646 also includes some cases for |
#650 also mentions |
#843 points out these oddities as well (which are enough to confuse github's parser!): 0and 1
0x1or 0 |
Noting that in 2.9.0, code like |
@jpmckinney please open a new issue with a full code sample and output and we can fix it. there are cases iirc where |
The following code does not result in any warnings:
The text was updated successfully, but these errors were encountered: