Skip to content

Commit

Permalink
Make mypy succeed with imports on master.py
Browse files Browse the repository at this point in the history
We get little benefit from our mypy QA checks at the moment, because we skip
imports. This patch is what's needed to make mypy succeed with imports on a
single file: master.py

It also updates mypy to the current version, and enables a QA check.

Mypy bugs I encountered:

dict.update with kwargs not supported:

python/mypy#1031

property setters and getters must be adjacent:

python/mypy#1465
  • Loading branch information
cortesi committed Mar 16, 2017
1 parent 5192810 commit d668836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mitmproxy/utils/typecheck.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing


def check_type(name: str, value: typing.Any, typeinfo: type) -> None:
def check_type(name: str, value: typing.Any, typeinfo: typing.Any) -> None:
"""
This function checks if the provided value is an instance of typeinfo
and raises a TypeError otherwise.
Expand Down

0 comments on commit d668836

Please sign in to comment.