Disable all linting across the entire file:
# pylint: disable-all (older)
# pylint: skip-file (newer)
# flake8: noqa
Disable specific linting errors across the entire file:
# pylint: disable=123
Note: flake8 can't do this, unless you use something like
tox.ini
So by addingignore = F403,E501
in a[flake8]
section ofsetup.cfg
ortox.ini
I've also seen this to be configurable with a .flake8 file instead of a tox.ini
Disable specific linting errors for specific lines:
some_code # noqa: E731,E123
some_code # noqa pylint: disable=unused-import