Skip to content

mypy thinks raise NotImplemented is okay #5710

@benjaminp

Description

@benjaminp

A mistake I've seen several times is to write raise NotImplemented rather than raise NotImplementedError. mypy is silent about this bug:

$ mypy --version
mypy 0.630
$ cat example.py
def f():
    # type: () -> None
    raise NotImplemented
$ mypy example.py
$

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions