¡Esta es una revisión vieja del documento!
Documentation:
Install:
pip install flake8
To use it for a folder:
# for the current path flake8 # or python -m flake8 # or flake8 /the/path
To use it for a file:
flake8 path/to/file.py
The output format is:
file path : line number : column number : error code : short description
Error code prefix:
You can configure the flake8 analysis using its command parameters (http://flake8.pycqa.org/en/latest/user/options.html) or placing them in a file named setup.cfg in the project root.
[flake8] exclude = .git,*migrations* max-line-length = 119
Just add # noqa in the end of the line.
def ready(self):
import cmdbox.profiles.signals.handlers # noqa
Or you can pass the specific error code you want to ignore:
import cmdbox.profiles.signals.handlers # noqa: F401