Skip to content

Missing argument to Callable crashes mypy #673

Closed
@spkersten

Description

@spkersten

This code (missing return type in Callable) crashes mypy with an uncaught IndexError:

from typing import Callable

def g(f: Callable[[int]]) -> None:
    pass

It should just report an error.

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