I'm editing a Django settings file that looks similar to the following:
# flake8: noqa
from lucy.settings.base import *
from lucy.settings.staging_production import *
# This ensures that errors from staging are tagged accordingly in Airbrake's console
AIRBRAKE.update(environment='staging')
LOGGING['handlers'].update(console={
'class': 'logging.StreamHandler'
})
This setting lucy/settings/staging.py
, extends two other ones and I'd like to keep the 'star imports', so I'd like to ignore error codes E403
and E405
for this file.
However, the only way I see to do that is to add the #noqa: E403, E405
comment to every line that it applies; by writing # flake8: noqa
at the top of the file, it ignores all errors.
As far as I can tell from http://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html, it isn't possible to do this, or have I overlooked something?
setup.py
handler, or whatever) that runs differentflake8
commands on different sets of input files. As far as I know, there's no way to do what you're trying to do—although it doesn't seem to be an entirely unreasonable request, so you might want to consider filing a feature request. (But first, is there a reason you're using the 3.1.1 docs instead of the current 3.5 docs? They're probably not likely to accept a feature request from someone who's using a 2-year-old version and not willing to upgrade…) – Parthiniapylint disable=E501,...
. – Cyrie.update()
something that hasn't been defined or imported before. So errors were being raised for every line in the example file, not just the first two. – Psychotechnics