Skip to content

Allow to disable a specific rule for a whole file #1891

@lypwig

Description

@lypwig

Summary

To disable a rule on a line, I could do:

foo() # ty: ignore[call-non-callable]

I can also disable type checking on the whole file by adding on the beginning of the file:

# type: ignore

It could be very practical allow a mix of both behaviors: disabling a specific rule for a whole file, by adding on the beginning of the file:

# ty: ignore[call-non-callable]

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRelated to settings and configurationsuppressionRelated to supression of violations e.g. ty:ignore

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions