Skip to content

Ignore specific error for whole file #11027

Closed
@WilliamDEdwards

Description

@WilliamDEdwards

It's possible to either # type: ignore for a whole file or # type: ignore[specific] on a line. A combination of both would be useful.

This script:

def test(input):
	pass

yields:

error: Function is missing a type annotation [no-untyped-def]

This script:

# type: ignore[assignment]

def test(input):
	pass

yields:

Success: no issues found in 1 source file

... while I think it would make more sense for the no-untyped-def error to still be raised, as we're only trying to ignore assignment errors.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions