-
Notifications
You must be signed in to change notification settings - Fork 751
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
E306 false positive #619
Comments
What version of pycodstyle are you running? What version of Python? How did you install pycodestyle? |
|
But it also happens when installed globally via pip:
|
Also with python3.5 |
Same with python 3.5. Kind of amazing this got as far as being released. 😕. |
@samuelcolvin if you want better quality, why not pay for it? No one is paid to work on this tool and it's entirely made during people's free time. |
These things happen I know. Not complaining, just commenting. Thanks a lot for pycodestyle @sigmavirus24. |
Those kinds of comments are demoralizing and not welcome on this project. |
This was another case of a sloppy regular expression that wasn't made to catch only *keywords* in the language. Closes PyCQAgh-619
The bug was already fixed since it also affected E302 but this adds a test to ensure it doesn't regress for nested definitions either. Closes PyCQAgh-619
This has already been fixed on master. I've added extra tests in #620. master will be released later today. |
For my part, I'm neither surprised nor bothered that bugs happen. I reported because I know enough about this project to get that far in triage, but wasn't able to quickly get as far as a patch with test. Thanks for your work maintaining this project, I know it's a huge commitment compared to the kind of drive-by bug reports I'm doing here. |
No worries @mlococo. Cheers! 🎉 |
And 2.3.1 was released with this bug fix. |
If I create demo.py with the following contents:
And run
pycodestyle demo.py
, I get:bug.py:3:5: E306 expected 1 blank line before a nested definition, found 0
. I believe E306 is intended to apply to nested function definitions, but this does not contain a nested function definition.The text was updated successfully, but these errors were encountered: