Pycodestyle: [feature request] detect space after class definition

Created on 31 Oct 2016  路  11Comments  路  Source: PyCQA/pycodestyle

printf 'class Foo (Bar):\n    pass\n' | pycodestyle -
                 ^

With pycodestyle 2.0.0 and 2.1.0.dev0.

All 11 comments

So there's nothing in PEP-0008 that precludes this. The only thing related to this is in Pet Peeves that describes calling a function like so:

spam (1)

As opposed to

spam(1)

I'm inclined to say that this is not a bug.

A little more agressive example:

printf 'class Foo \t (Bar):\n    pass\n' | pycodestyle -

is pycodestyle about bad coding style or implementing PEP8 strictly? This code looks very ugly.

is pycodestyle about bad coding style or implementing PEP8 strictly?

pycodestyle is what used to be called pep8 and is very firmly rooted in the document's guidance.

At least my second example needs to be detected as E101 mixed-spaces-and-tabs, right?

I believe E101 is purely about indentation, but I haven't double-checked that.

Yes, E101 tells about indentation as all E1 are indentation issues. Nevermind, it is up to you what you are doing with this issue. My opinion is that it is not preferable style. Maybe one needs to discuss this at PEP8 directly or maybe pycodestyle can just introduce some new E2 code. Just wanted to let you know this issue as I saw it in our code.

If this is a non-issue now can you close this spaceone?

@lathama I'm not sure this is a non-issue.

maybe edit the title then.

Why, the title is still accurate? A space after a class definition is not detected and ... _maybe_ it should be.

Sorry, attempting to grok project status. Ack on the maybe, a tag or label identifying feature request would be good here.

Was this page helpful?
0 / 5 - 0 ratings