[openstack-dev] [all] Update to flake8 and failures despite # flake8: noqa

David Moreau Simard dmsimard at redhat.com
Fri Oct 26 16:53:17 UTC 2018

Hi openstack-dev,

I stumbled on odd and sudden pep8 failures with ARA recently and
brought it up in #openstack-infra [1].

It was my understanding that appending "  # flake8: noqa" to a line of
code would have flake8 ignore this line if it happened to violate any
linting rules.
It turns out that, at least according to the flake8 release notes [2],
"flake8: noqa" is actually meant to ignore the linting on an entire

The correct way to ignore a specific line appears to be to append "  #
noqa" to the line... without "flake8: ".
Looking at codesearch [3], there is a lot of projects using the
"flake8: noqa" approach with the intent of ignoring a specific line.

It would be important to fix that in order to make sure we're only
ignoring the specific lines we're interested in ignoring and prevent
upcoming failures in the jobs.

[1]: http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2018-10-26.log.html#t2018-10-26T16:18:38
[2]: http://flake8.pycqa.org/en/latest/release-notes/3.6.0.html
[3]: http://codesearch.openstack.org/?q=flake8%3A%20noqa&i=nope&files=&repos=

David Moreau Simard
dmsimard = [irc, github, twitter]

More information about the OpenStack-dev mailing list