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

Formatting error for multiple spaces after a keyword is not emitted #3220

Closed
finefoot opened this issue Oct 28, 2019 · 3 comments
Closed

Formatting error for multiple spaces after a keyword is not emitted #3220

finefoot opened this issue Oct 28, 2019 · 3 comments

Comments

@finefoot
Copy link

Like

if          0 == 1:
    pass

or

def         func():
    pass

for example.

There is a sentence in PEP 8 about what to do if the statement is too long for one line and it specifies a single space character:

(...) it's worth noting that the combination of a two character keyword (i.e. if), plus a single space, plus an opening parenthesis creates (...)

So I'd assume, a single space is the way to go for keywords.

@PCManticore
Copy link
Contributor

Because no one got to implement it yet.

@PCManticore PCManticore changed the title Why isn't there an error for multiple spaces after a keyword? Formatting error for multiple spaces after a keyword is not emitted Oct 30, 2019
@enkidulan
Copy link

I've started working on it as part of PyCon Canada sprints

@jacobtylerwalls
Copy link
Member

bad-whitespace was removed in #3577 as not fitting pylint's roadmap, so since this code style issue is most like that warning, I suggest closing this issue on that basis.

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

No branches or pull requests

5 participants