When normalizing paths in flake8.utils, we use the os.path.sep constant
to determine if the item is intended to be a path. If Windows users then
have a path like
foo\bar
Specified, they will get the same behaviour as a *nix user with
foo/bar
This change was originally triggered by @gvanrossum requeesting
that pep8 (the tool) be renamed to avoid confusion with PEP-8
the document. This request is tracked at:
https://github.com/PyCQA/pycodestyle/issues/466
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.
Since we now treat pep8 checks each as an individual plugin, we need a way to
represent pep8 as a single plugin in the version output (like we currently
do). As such we need to be a bit wiser in how we tell the OptionManager about
plugins and their versions and we only do this for certain plugins.
If we start collecting the results in run_parallel *immediately* after
starting the worker processes, we do not need another process to handle
the results. This also allows us to store all of the results on a the
FileChecker class and process results uniformly. This also means we can
count the number of errors and warnings in a run and use that to exit
appropriately (using SystemExit).