#2238 Project wide flake8 fixes and now tests enforced.
Merged by pingou. Opened by pingou.
flake8_fix  into  master

Download 2238.patch
no initial comment

1 new commit added

  • List flake8 in the requirements for the tests

11 new commits added

  • List flake8 in the requirements for the tests
  • Add a test enforcing the flake8 compliance
  • Final flake8 fixes
  • Some more flake8 clean up
  • Flake8 fixes to pagure
  • flake8 fixes to pagure.ui
  • flake8 fixes to pagure.lib
  • flake8 fixes to pagure.hooks
  • flake8 fixes to pagure.internal
  • flake8 fixes to pagure.cli
  • flake8 fixes to pagure.api

1 new commit added

  • Small pep8 fix to make the test suite happy on jenkins

If you use # noqa: E402 it'll ignore the fact that the import isn't at the top of the file, but you'll still get a warning when the import is no longer used.

1 new commit added

  • And another pep8 fix to make the test suite happy on jenkins

PEP-8 imports should be in three groups with a blank line between each: stdlib, 3rd party, local app/library.

I prefer to put from ... import imports above import ..., but I don't think it really matters.

I'm not sure what's getting ignored here, but it'd be better to ignore the one error code that's causing problems if it's not fixable.

Good one :)

I tend to follow that, but I often introduce a blank line between the import and the from ... import (which I prefer after the import ^^)

IIRC it was something in the indentation in the docstring, I'll look at it again

Generally looks good, but I recommend adding the specific errors you want to ignore to the # noqa statements, especially the imports so it'll still catch unused imports.

:thumbsup:

So it was E501, line to long :)

I've adjusted the # noqa to be more specific.

2 new commits added

  • Be explicit about which error to ignore
  • Be explicit about which error to ignore on imports

2 new commits added

  • Ignore some of the import that are useful although not apparently used
  • Drop un-used imports, thanks jenkins

1 new commit added

  • Hopefully last flake8 fix

Since jenkins is finally passing, I'm going to merge this.

Thanks for your review @jcline !

Pull-Request has been merged by pingou

Metadata