Skip to content

Split unused-ignore-comment and introduce separate rule for unused type: ignore comments #2494

@lypwig

Description

@lypwig

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

Metadata

Metadata

Assignees

Labels

configurationRelated to settings and configuration

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions