Pydantic false positive
nosid91 opened this issue · comments
Dima Redchyts commented
We often use Pydantic in our projects. There are several problems with Pydantic classes.
1)
src/employee/models.py:11: unused variable 'first_name' (60% confidence)
src/employee/models.py:12: unused variable 'middle_name' (60% confidence)
src/employee/models.py:13: unused variable 'last_name' (60% confidence)
for model:
id: UUID4
first_name: str
middle_name: str
last_name: str
- It completely ignores Pydantic classes and does not check their usage. It only checks the variables from the example above
vulture 2.5
Jendrik Seipp commented
Thanks for the report! Since Vulture cannot detect that this code is actually used, I recommend adding the variables to a whitelist file (see README.md).