This allows us to handle --show-source in our formatters by default.
This also adds the physical line information to the Error class instead
of passing it to is_inline_ignored. This allows us to avoid using
linecache in our formatters.
Python 2.7's ConfigParser module does not allow for the behaviour we
have documented for config files in Flake8 3.0. To compensate for that,
we add a dependency on the configparser backport on PyPI for Python 2.7
We move the logic to add or remove a plugin from the default ignore
list to individual methods on the Plugin class (Plugin#enable,
Plugin#disable) and use that when registering and parsing options.
If the plugin is off-by-default, Plugin#register_options will use
Plugin#disable. When parsing options via Plugin#provide_options, if
the plugin has been specified in --enable-extensions then it will be
re-enabled via Plugin#enable.
- Add more documentation around utils functions
- Fix documentation about default formatting plugins
- Add extra documentation of filenames_from predicate parameter
- Add test for the default parameter of flake8.utils.fnmatch
Flake8 and pep8 has historically supported three types of checks:
- Plugins that accept the physical line
- Plugins that accept the logical line
- Plugins that accept the AST tree
The logical place to make this distinction is on the Checkers plugin
type manager class. This adds the foundation for finding plugins that
fall into each class.
We add utils.fnmatch and utils.filenames_for in anticipation of our
checker manager creating file checkers for each file. We also include
tests for these functions and a couple previously untested utility
functions.
Let's catch exceptions, log them, and re-raise as a FailedToLoad
exception. This also refactors the actually loading of plugins into a
private method on the Plugin class.