Split unused-ignore-comment and introduce separate rule for unused type: ignore comments (original) (raw)

Summary

I work on a Django application and I use both ty and Pyright for type checking.

I need to ignore typing on Meta classes, otherwise Pyright complains about reportIncompatibleVariableOverride:

class Meta:  # type: ignore[reportIncompatibleVariableOverride]

But this comment triggers ty rule unused-ignore-comment (Unused blanket type: ignore directive), incorrectly because the directive IS actually used, by Pyright.

Version

ty 0.0.11