Skip to content

Ignore a new Flake8 whitespace error#1158

Merged
tuturto merged 2 commits intohylang:masterfrom
Kodiologist:no-on-prop-305
Nov 27, 2016
Merged

Ignore a new Flake8 whitespace error#1158
tuturto merged 2 commits intohylang:masterfrom
Kodiologist:no-on-prop-305

Conversation

@Kodiologist
Copy link
Member

Fixes #1157.

The new check is E305. Since we're now using the --ignore option, we have to list all the checks that are ignored by default, too.

I decided that ignoring E305 was better than changing the whitespace it was complaining about because, in at least some cases in our current codebase, single blank lines are used to indicate that several top-level definitions are associated with each other.

Fixes hylang#1157.

The new check is E305. Since we're now using the `--ignore` option, we have to list all the checks that are ignored by default, too.

I decided that ignoring E305 was better than changing the whitespace it was complaining about because, in at least some cases in our current codebase, single blank lines are used to indicate that several top-level definitions are associated with each other.
@gilch
Copy link
Member

gilch commented Nov 26, 2016

👍 I'm not sure this is the right solution long term, but I'll approve this for now, since it's kind of holding up other PRs.

@gilch
Copy link
Member

gilch commented Nov 26, 2016

Here's the table for the error codes, if that helps anyone.

@gilch
Copy link
Member

gilch commented Nov 26, 2016

Wait, what's W504?

@Kodiologist
Copy link
Member Author

Good question. It's in the default of --ignore and it's mentioned in passing a few times in the Flake8 documentation. Perhaps it's a check that used to exist but has been removed.

@gilch
Copy link
Member

gilch commented Nov 26, 2016

Did I find the wrong table? Does everything still work if you delete W504, then? If so, you should probably leave it out.

@gilch
Copy link
Member

gilch commented Nov 26, 2016

Maybe we should also bug the flake8 people about this inconsistency. Or maybe the pycodestyle people. They may have neglected to update their docs.

@Kodiologist
Copy link
Member Author

That would be my guess.

@gilch
Copy link
Member

gilch commented Nov 26, 2016

PyCQA/pycodestyle#502

Looks like W504 isn't ready yet. The meaning could still change though. Best leave it off for now. We can always put it back later if we have to.

@Kodiologist
Copy link
Member Author

Makes sense, I guess.

@tuturto
Copy link
Contributor

tuturto commented Nov 27, 2016

Looks good to me

@tuturto tuturto merged commit 4e93fcb into hylang:master Nov 27, 2016
@Kodiologist Kodiologist deleted the no-on-prop-305 branch February 10, 2017 21:13
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