Skip to content

Fix misleading error message for E251#171

Merged
florentx merged 2 commits intoPyCQA:masterfrom
ymattw:e251-spaces
Feb 26, 2013
Merged

Fix misleading error message for E251#171
florentx merged 2 commits intoPyCQA:masterfrom
ymattw:e251-spaces

Conversation

@ymattw
Copy link
Copy Markdown
Contributor

@ymattw ymattw commented Feb 25, 2013

Here's my code snip:

    17  setup(
    18      name = 'cdiff',
    19      version = _meta['version'],

And the pep8 report:

~/ws/cdiff (master)$ pep8 --first --show-source setup.py 
setup.py:18:9: E251 no spaces around keyword / parameter equals
    name = 'cdiff',
        ^

I was very confused when reading the message, I think it is misleading and better to change the "no" to "unexpected" in the message.

BTW do you think we should allow the spaces around the equal sign in above case that one parameter takes the whole line? I personally think that is more readable.

@sigmavirus24
Copy link
Copy Markdown
Member

👍 Alternatively, "There should be no spaces ..."

@florentx
Copy link
Copy Markdown
Contributor

I agree, and the docs/intro.rst should be updated too.

florentx added a commit that referenced this pull request Feb 26, 2013
Fix misleading error message for E251
@florentx florentx merged commit f82bf22 into PyCQA:master Feb 26, 2013
@florentx
Copy link
Copy Markdown
Contributor

Thank you

@ymattw ymattw deleted the e251-spaces branch February 26, 2013 13:27
@sigmavirus24
Copy link
Copy Markdown
Member

🍰

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

Successfully merging this pull request may close these issues.

3 participants