jendrikseipp / vulture

Find dead Python code
MIT License
3.29k stars 145 forks source link

False positives for TypedDicts #335

Open alicederyn opened 8 months ago

alicederyn commented 8 months ago

The following code:

class ExampleTypedDict(typing.TypedDict):
  field1: int
  field2: str

Results in unused variable 'field1' (60% confidence) (same for field2).

As this is how TypedDicts are designed to work, probably the correct solution is to special-case them.