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

pycodestyle 2.1.0 incorrectly flags E305 on module-level constants #601

Closed
sirosen opened this issue Nov 14, 2016 · 3 comments
Closed

pycodestyle 2.1.0 incorrectly flags E305 on module-level constants #601

sirosen opened this issue Nov 14, 2016 · 3 comments

Comments

@sirosen
Copy link

sirosen commented Nov 14, 2016

Our build server pulled in the latest this morning, and we saw failures on files which should be valid because of this.

pycodestyle 2.1.0 seems to be matching for E305 on lines with def or class as a prefix, when it should be looking for def and class .

Simple example:

classic_value = 0
default_foo = 1
default_bar = 2

Those second two lines will be flagged for E305 because there isn't enough whitepace after classic_value or default_foo.

Fix should be simple -- make sure that match requires whitespace -- and this needs a testcase too. I'll be fixing my own code to get past the slightly broken validation, then look into submitting a PR if I can figure out this codebase (never made a contribution before).
As always, thanks for great tools!

EDIT: This can be considered a duplicate of #593 . Sorry for not finding that before submitting.

@sirosen
Copy link
Author

sirosen commented Nov 14, 2016

I just checked and this seems to be fixed in pycodestyle==2.2.0.dev0.

Should this be closed? I still have a test case I can add for posterity, if that's worth it to anyone.

@IanLee1521
Copy link
Member

IanLee1521 commented Nov 14, 2016

Let's go ahead and close this since it's fixed. Based some some comments, I think 2.2.0 is going to end up getting released shortly, which will address this. Thanks for catching this @sirosen !

@IanLee1521
Copy link
Member

Version 2.2.0 was just released, so this should be fixed now.

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