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

How to ignore unused variable attributes of a Meta class? #315

Open
albertas opened this issue Jul 6, 2023 · 0 comments
Open

How to ignore unused variable attributes of a Meta class? #315

albertas opened this issue Jul 6, 2023 · 0 comments

Comments

@albertas
Copy link

albertas commented Jul 6, 2023

Its a common practice to use Meta class to set options in frameworks. e.g.:

from marshmallow import Schema, EXCLUDE

class MySchema(Schema):
    class Meta:
        unknown = EXCLUDE

When calling vulture with vulture . --ignore-names=Meta, I get this error message:

example.py:5: unused variable 'unknown' (60% confidence)

I imagine that an option ignore_attrs_of_classes=Meta could be added.

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

No branches or pull requests

1 participant