Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulture configuration in pyproject.toml ignored #505

Open
noctuid opened this issue Mar 30, 2022 · 6 comments
Open

Vulture configuration in pyproject.toml ignored #505

noctuid opened this issue Mar 30, 2022 · 6 comments

Comments

@noctuid
Copy link

noctuid commented Mar 30, 2022

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
@songololo
Copy link

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...

@gasbasd
Copy link

gasbasd commented Feb 14, 2023

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?

@nicoloverardo
Copy link

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.

@Teagum
Copy link

Teagum commented Dec 15, 2023

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.

@noctuid
Copy link
Author

noctuid commented Dec 15, 2023

But this ticket isn't about pylint?

@carlio
Copy link
Contributor

carlio commented Dec 15, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants