prospector
prospector copied to clipboard
[BUG] Prospector uses `exclude` option from setup.cfg and passes it to pylint resulting in an invalid option
Describe the bug
Since version 1.7.1 prospector takes exclude option from various sections in setup.cfg and passes it to pylint resulting in:
pylint: error: ambiguous option: --exclude could match --exclude-protected, --exclude-too-few-public-methods
To Reproduce Steps to reproduce the behavior:
- Create and activate a new venv and run
pip install prospector - Create
setup.cfgwith any section (e.g.[foobar]) and place the optionexclude = foounder it - Call
prospectorwithout arguments - See error
Expected behavior Prospector runs without the pylint error
Environment (please complete the following information):
- OS: macOS 12.6
- Tool prospector, pylint
- Prospector version 1.7.7
- Python version 3.10.6
Additional context When downgrading to prospector 1.7.0, it works as expected.
astroid==2.12.10
dill==0.3.5.1
dodgy==0.2.1
flake8==4.0.1
flake8-polyfill==1.0.2
isort==5.10.1
lazy-object-proxy==1.7.1
mccabe==0.6.1
pep8-naming==0.10.0
platformdirs==2.5.2
prospector==1.7.7
pycodestyle==2.8.0
pydocstyle==6.1.1
pyflakes==2.4.0
pylint==2.15.3
pylint-celery==0.3
pylint-django==2.5.3
pylint-flask==0.6
pylint-plugin-utils==0.7
PyYAML==6.0
requirements-detector==0.7
setoptconf-tmp==0.3.1
snowballstemmer==2.2.0
toml==0.10.2
tomli==2.0.1
tomlkit==0.11.5
wrapt==1.14.1
This is still the case in 1.8.4., where
[options.packages.find]
include = mypackage, mypackage.*
yields a misleading:
pylint: error: argument --include-naming-hint: (None, "Invalid yn value 'mypackage, mypackage.*', should be in ('y', 'true', 'yes', 'no', 'n', 'false')")