mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
fix untyped def issues in aqt/mediasrv.py
This commit is contained in:
parent
5c176b23c4
commit
c1ecb7b827
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ class MediaServer(threading.Thread):
|
||||||
if devMode:
|
if devMode:
|
||||||
print(
|
print(
|
||||||
"Serving on http://%s:%s"
|
"Serving on http://%s:%s"
|
||||||
% (self.server.effective_host, self.server.effective_port)
|
% (self.server.effective_host, self.server.effective_port) # type: ignore
|
||||||
)
|
)
|
||||||
|
|
||||||
self._ready.set()
|
self._ready.set()
|
||||||
|
@ -76,7 +76,7 @@ class MediaServer(threading.Thread):
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.is_shutdown = True
|
self.is_shutdown = True
|
||||||
sockets = list(self.server._map.values())
|
sockets = list(self.server._map.values()) # type: ignore
|
||||||
for socket in sockets:
|
for socket in sockets:
|
||||||
socket.handle_close()
|
socket.handle_close()
|
||||||
# https://github.com/Pylons/webtest/blob/4b8a3ebf984185ff4fefb31b4d0cf82682e1fcf7/webtest/http.py#L93-L104
|
# https://github.com/Pylons/webtest/blob/4b8a3ebf984185ff4fefb31b4d0cf82682e1fcf7/webtest/http.py#L93-L104
|
||||||
|
@ -84,7 +84,7 @@ class MediaServer(threading.Thread):
|
||||||
|
|
||||||
def getPort(self):
|
def getPort(self):
|
||||||
self._ready.wait()
|
self._ready.wait()
|
||||||
return int(self.server.effective_port)
|
return int(self.server.effective_port) # type: ignore
|
||||||
|
|
||||||
|
|
||||||
@app.route("/<path:pathin>", methods=["GET", "POST"])
|
@app.route("/<path:pathin>", methods=["GET", "POST"])
|
||||||
|
|
Loading…
Reference in a new issue