Opened 2 years ago

Last modified 2 years ago

#3403 assigned undecided

replace pep8+pyflakes with flake8

Reported by: rutsky Owned by:
Priority: major Milestone: undecided
Version: master Keywords: simple
Cc:

Description

Looks like flake8 does pep8 checks and pyflakes checks, but in addition allows more tuning of ignored checks.

For example, instead of doing hush_pyflakes:

from buildbot.process.buildrequest import BuildRequest
_hush_pyflakes = [BuildRequest]

with flake8 is possible to ignore warnings from single line using # noqa directive:

from buildbot.process.buildrequest import BuildRequest  # noqa

Even author of pyflakes suggests in README:

If you require more options and more flexibility, you could give a look to Flake8 too.

Right now I stumbled with the issue, that it's not possible to use star import with pyflakes at all (yes, I need exactly star import), and AFAIK there is no way to disable this warning in specific file.

Change History (5)

comment:1 Changed 2 years ago by rutsky

Is "do only pep8 check" step is required? It's definitely useful, but can we live with only "do pep8+pyflakes" and "ignore" pyflakes output?

Since I rely on ignoring of PEP8 in Slave->Worker Renaming project (https://github.com/buildbot/buildbot/pull/1943) I've done some changes to support flake8 in validate.sh and in Travis: https://github.com/rutsky/buildbot/commit/00c1adf4eaea07168012af17e0711975286a9419 https://github.com/rutsky/buildbot/commit/af446532070560f6921c0b2b59eacb4e520a5f66

However I didn't removed yet PEP8 step and now PEP8 config is duplicated (in common/flake8rc and common/pep8rc).

comment:2 Changed 2 years ago by rutsky

  • Owner set to rutsky
  • Status changed from new to assigned

comment:3 Changed 2 years ago by rutsky

First part of the work to resolve this issue: https://github.com/buildbot/buildbot/pull/1951

comment:4 Changed 2 years ago by rutsky

  • Owner rutsky deleted

comment:5 Changed 2 years ago by rutsky

  • Keywords simple added
Note: See TracTickets for help on using tickets.