update to mypy 1.0 (#5918)
This commit is contained in:
parent
7da3a8e871
commit
8f78052493
|
@ -197,7 +197,9 @@ class Client(Connection):
|
|||
tls_state = ", tls"
|
||||
else:
|
||||
tls_state = ""
|
||||
return f"Client({human.format_address(self.peername)}, state={self.state.name.lower()}{tls_state})"
|
||||
state = self.state.name
|
||||
assert state
|
||||
return f"Client({human.format_address(self.peername)}, state={state.lower()}{tls_state})"
|
||||
|
||||
@property
|
||||
def address(self): # pragma: no cover
|
||||
|
@ -296,7 +298,9 @@ class Server(Connection):
|
|||
local_port = f", src_port={self.sockname[1]}"
|
||||
else:
|
||||
local_port = ""
|
||||
return f"Server({human.format_address(self.address)}, state={self.state.name.lower()}{tls_state}{local_port})"
|
||||
state = self.state.name
|
||||
assert state
|
||||
return f"Server({human.format_address(self.address)}, state={state.lower()}{tls_state}{local_port})"
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
if name in ("address", "via"):
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -29,13 +29,13 @@ commands =
|
|||
|
||||
[testenv:mypy]
|
||||
deps =
|
||||
mypy==0.991
|
||||
mypy==1.0.0
|
||||
types-certifi==2021.10.8.3
|
||||
types-Flask==1.1.6
|
||||
types-Werkzeug==1.0.9
|
||||
types-requests==2.28.11.5
|
||||
types-requests==2.28.11.11
|
||||
types-cryptography==3.3.23.2
|
||||
types-pyOpenSSL==22.1.0.2
|
||||
types-pyOpenSSL==23.0.0.2
|
||||
-e .[dev]
|
||||
|
||||
commands =
|
||||
|
|
Loading…
Reference in New Issue