Skip to content

Ignore specific error for whole file #11027

Closed

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.

Activity

  1. WilliamDEdwards commented on Apr 5, 2022

    @WilliamDEdwards
    Author

    Related: #11462

  2. added a commit that references this issue on Aug 25, 2022
    9dd525d
  3. added a commit that references this issue on Aug 26, 2022
    da56c97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions