KEMBAR78
disable_error_code + unused type:ignore comment · Issue #11059 · python/mypy · GitHub
Skip to content

disable_error_code + unused type:ignore comment #11059

@Akuli

Description

@Akuli

Bug Report

If I have # type: ignore[no-untyped-call] and disable_error_code = no-untyped-call and strict = true, I don't get errors.

To Reproduce

Create mypy.ini as below and put this to foo.py

def foo(): pass  # type: ignore
foo()  # type: ignore[no-untyped-call]

Expected Behavior

error about unnecessary ignore comment on SECOND line (but no error on first line as strict = true means you must use type hints when defining)

Actual Behavior

no error

Your Environment

  • Mypy version used: 0.9.10
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files):
[mypy]
strict = True
disable_error_code = no-untyped-call

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions