Skip to content Skip to sidebar Skip to footer
Showing posts with the label Typechecking

Function Annotation In Python 3 Get "name Not Defined" Error

I am trying to use python3 type annotation features. Here is some toy functions without annotation:… Read more Function Annotation In Python 3 Get "name Not Defined" Error

How To Make Mypy Complain About Assigning An Any To An Int

mypy --strict dutifully complains about the following code: from typing import Any, Dict def main(… Read more How To Make Mypy Complain About Assigning An Any To An Int

Why Return Type Is Not Checked In Python3?

Example from PEP 484 -- Type Hints def greeting(name: str) -> str: return 'Hello ' +… Read more Why Return Type Is Not Checked In Python3?