Thanks to visit codestin.com
Credit goes to github.com

Skip to content

warn-unused-ignores doesn't fire when ignoring multiple codes #11157

Description

@spagh-eddie

To Reproduce

# test.py 

a = object()

def f() -> int:
    return a[b'c'] # type: ignore[index, override]

Expected Behavior

a is not indexable but ignored.
An error along the lines of unused "type: ignore" comment for override

Actual Behavior

% mypy --warn-unused-ignores test.py 
Success: no issues found in 1 source file

Your Environment

% mypy --version
mypy 0.910

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions