Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] MNT Use the default flake8 --ignore options #9123

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

Merged
merged 2 commits into from
Jun 14, 2017

Conversation

rth
Copy link
Member

@rth rth commented Jun 14, 2017

Fixes #9121

This makes sure that the the TravisCI flake8 build is using the default flake8 --ignore options, for smoother contribution workflow.. Also checked that these are defaults in the flake8 master branch.

As suggested by @lesteve this specifies the ignored errors/warnings explicitly, while keeping one extra ignored error for examples. Unless you think it's better to simply remove the --ignore flag for non-examples?

cc @jnothman

@lesteve
Copy link
Member

lesteve commented Jun 14, 2017

OK that looked good to me. I pushed a small change and I'll merge this as soon as the Travis flake8 build passes.

@jnothman
Copy link
Member

LGTM, although I've not checked what these particular error codes are.

@rth
Copy link
Member Author

rth commented Jun 14, 2017

Thanks @lesteve and @jnothman !

@lesteve lesteve merged commit fe3a73b into scikit-learn:master Jun 14, 2017
@lesteve
Copy link
Member

lesteve commented Jun 14, 2017

Merged thanks a lot for the PR and the build reproducing the problem!

@rth
Copy link
Member Author

rth commented Jun 14, 2017

Thanks! For future reference, the default flake8 errors are (cf [1], [2]),

  • E121 (*^) continuation line under-indented for hanging indent
  • E123 (*) closing bracket does not match indentation of opening bracket’s line
  • E126 (*^) continuation line over-indented for hanging indent
  • E226 (*) missing whitespace around arithmetic operator
  • E26 : couldn't find where it is documented
  • E704 (*) multiple statements on one line (def)
  • W503 (*) line break occurred before a binary operator
  • W504 : couldn't find where it is documented

the flake8 documentation also states,

In the default configuration, the checks E121, E123, E126, E133, E226, E241, E242, E704 and W503 are ignored because they are not rules unanimously accepted, and PEP 8 does not enforce them.

(which BTW doesn't match with the actual default parameters)

@rth rth deleted the flake8-opts branch June 14, 2017 13:34
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
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