Merge pull request #426 from yhoiseth/remote-server-run-types

RemoteServer._run type hints
This commit is contained in:
Damien Elmes 2020-01-23 17:22:58 +10:00 committed by GitHub
commit 30bac29682
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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>
********************

View file

@ -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")
)