prospector
prospector copied to clipboard
Vulture configuration in pyproject.toml ignored
Describe the bug Similar to #485 (which was not fixed for me on 1.7.6), vulture configuration in the pyproject.toml file is ignored.
To Reproduce
Run poetry run prospector in a project with a pyproject.toml that has vulture configuration (e.g. ignore-decorators configuration for @app.get, @app.post, etc.). I get vulture warnings about unused functions from prospector even though poetry run vulture <file> gives no warnings.
Expected behavior Prospector should use any vulture configuration in the pyproject.toml.
Environment
- OS: Windows
- Tool: vulture
- Prospector version: 1.7.6
- Python version: 3.10.2
Similar issue encountered with pydocstyle.
e.g.
[tool.pydocstyle]
# http://www.pydocstyle.org/en/stable/error_codes.html
ignore = [
'D104', # Missing docstring in public package
'D200', # One-line docstring should fit on one line with quotes
'D212', # Multi-line docstring summary should start at the first line
]
Isn't picked-up...
hi guys, any news on this? At the moment i can't use vulture with prospector because i need to ignore some decorators, anyway there are any workaround?
Similar issue encountered with
pydocstyle.e.g.
[tool.pydocstyle] # http://www.pydocstyle.org/en/stable/error_codes.html ignore = [ 'D104', # Missing docstring in public package 'D200', # One-line docstring should fit on one line with quotes 'D212', # Multi-line docstring summary should start at the first line ]Isn't picked-up...
Same here on Python 3.10, prospector==1.9.0 and pydocstyle==6.3.0.
This is a "did you try to restart?" comment, so please don't be offended.
I was troubleshooting the same error the OP has for an hour or so when I realized, that there was a stray .pylintrc in the working tree. I don't know how it got there since I haven't used that config style in ages, however, removing it fixed the problem for me. So, maybe double check your file listing.
But this ticket isn't about pylint?
@noctuid I think the point Teagum is making is that if prospector is picking up vulture-specific config first somewhere else, it'll ignore the pyproject.toml stuff, so check in case you have any leftovers from previous configuration in case that will fix it.
Regarding this bug I'm sorry that it escaped my notice, I'll try to get around to dealing with it properly, been a bit busy with life...
If you want to have a go yourself and create a PR that'd be great, have a look here to start : https://github.com/landscapeio/prospector/blob/master/prospector/tools/vulture/init.py#L68