mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
Merge pull request #426 from yhoiseth/remote-server-run-types
RemoteServer._run type hints
This commit is contained in:
commit
30bac29682
2 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ Aristotelis P. <https://glutanimate.com/contact>
|
|||
Erez Volk <erez.volk@gmail.com>
|
||||
zjosua <zjosua@hotmail.com>
|
||||
Arthur Milchior <arthur@milchior.fr>
|
||||
Yngve Hoiseth <yngve@hoiseth.net>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ class RemoteServer(HttpSyncer):
|
|||
def abort(self, **kw) -> Any:
|
||||
return self._run("abort", kw)
|
||||
|
||||
def _run(self, cmd, data) -> Any:
|
||||
def _run(self, cmd: str, data: Any) -> Any:
|
||||
return json.loads(
|
||||
self.req(cmd, io.BytesIO(json.dumps(data).encode("utf8"))).decode("utf8")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue