mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
update mypy
This commit is contained in:
parent
8cec4a2a80
commit
bed008e6d1
@ -29,6 +29,7 @@ def load_script(path: str) -> typing.Optional[types.ModuleType]:
|
||||
try:
|
||||
loader = importlib.machinery.SourceFileLoader(fullname, path)
|
||||
spec = importlib.util.spec_from_loader(fullname, loader=loader)
|
||||
assert spec
|
||||
m = importlib.util.module_from_spec(spec)
|
||||
loader.exec_module(m)
|
||||
if not getattr(m, "name", None):
|
||||
|
@ -17,6 +17,12 @@ import collections.abc
|
||||
import pydivert
|
||||
import pydivert.consts
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
class WindowsError(OSError):
|
||||
@property
|
||||
def winerror(self) -> int:
|
||||
return 42
|
||||
|
||||
REDIRECT_API_HOST = "127.0.0.1"
|
||||
REDIRECT_API_PORT = 8085
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user