Skip to content

Replace vulture's unused variable and unused import checks with ruff? #241

@joelostblom

Description

@joelostblom

In https://github.com/seedcase-project/seedcase-flower/pull/112/changes#r2802805789, I noticed some false positives flagged by vulture. It incorrectly flags Enum constants as unused variables at the 60% confidence level, so that we have to add exceptions manually.

I have a suggestion for how to deal with this in a potentially more convenient way: What do you think of increasing the confidence threshold of vulture and instead use ruff's ARG ruleset to detect unused method and function arguments? They seem equivalent, but ruff's might be more suitable for us since it doesn't flag this these Enum style variables as unused.

Since ruff already checks for unused imports by default, it seems like we could set vulture's confidence level all the way up to 100, so that it is just used for dead code detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions