call last): File "/Users/pyq/scripts/distance.py", line 10, in <module> d = distance(point_1, point_2) File "/Users/pyq/scripts/distance.py", line 3, in distance dy = abs(p1["y"] - p2["y"]) KeyError: 'y'
10, in <module> d = distance(point_1, point_2) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pyq/scripts/distance.py", line 3, in distance dy = abs(p1["y"] - p2["y"]) ~~^^^^^ KeyError: 'y'
in <module> d = distance(point_1, point_2) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pyq/scripts/distance.py", line 3, in distance dy = abs(p1["y"] - p2["y"]) ~~^^^^^ KeyError: 'y'
$ mypy sample.py sample.py:7: error: Argument 1 to "sum" has incompatible type "Union[int, List[int]]"; expected "Iterable[int]" sample.py:9: error: Unsupported operand types for + ("int" and "List[int]") sample.py:9: note: Right operand is of type "Union[int, List[int]]"