mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Make mypy succeed with imports on master.py
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: https://github.com/python/mypy/issues/1031 property setters and getters must be adjacent: https://github.com/python/mypy/issues/1465
This commit is contained in:
parent
c0882496e3
commit
39659c7528
@ -1,7 +1,7 @@
|
|||||||
import typing
|
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
|
This function checks if the provided value is an instance of typeinfo
|
||||||
and raises a TypeError otherwise.
|
and raises a TypeError otherwise.
|
||||||
|
Loading…
Reference in New Issue
Block a user