pylint_runner
pylint_runner copied to clipboard
Use pylint config parser for pyproject.toml and setup.cfg support
Pylint 2.5.0 and later support reading configuration from pyproject.toml
or setup.cfg
if pylintrc
and .pylintrc
do not exist. (PyCQA/pylint#3169) In order to support these configuration files, this PR changes pylint_runner to use pylint.lint.pylinter.PyLinter#read_config_file()
instead of configparser.ConfigParser#read()
to read the pylint configuration.
It also adds a check to avoid configparser.NoOptionError
if ignore
is not configured and to strip whitespace from ignore
values as pylint does. If you would prefer these to be moved to a separate PR, let me know.
Thanks, Kevin
For reference, the test failures don't appear to be related to this PR (since it doesn't change setup.py
or tests/test_runner.py
which are causing the pylint check to fail). I'd be happy to rebase this PR once those issues are fixed.
Sorry about that @kevinoid. Master has been fixed and tests are passing once again.
No worries. Thanks for the quick fix @MasterOdin! It should pass the CI tests now.
I added an additional commit to avoid modifying Runner.DEFAULT_ARGS
(4cb3cee051de5cecb1821494cace319356335693) which was causing the changes to fail the test unnecessarily. If you'd like to consider that as a separate PR first, let me know.