Is there a way to ignore mypy checks on a single function?

Viewed 4228

You can ignore mypy checks on a individual lines as answered here. Is there a way to ignore mypy for a full function?

1 Answers

mypy checks can be ignored for a full function by adding @typing.no_type_check decorator on top of the function.

import typing
@typing.no_type_check
def some_function():
    ...
Related