Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type in unannotated function

  • --check-untyped-def
  • --strict

def do_something():
    answer :str = 42
    print(answer)

do_something()
$ mypy unannotated_function.py

$ mypy --check-untyped-def unannotated_function.py

$ mypy --strict unannotated_function.py