added more type hinting for returns

This commit is contained in:
UpstreamData
2021-09-23 12:09:17 -06:00
parent 5ba768d0bc
commit e3bc84455d
4 changed files with 111 additions and 111 deletions

View File

@@ -21,11 +21,11 @@ class BaseMinerAPI:
self.port = port
self.ip = ip
async def multicommand(self, *commands: str):
async def multicommand(self, *commands: str) -> dict:
command = "+".join(commands)
return await self.send_command(command)
async def send_command(self, command, parameters: dict = None):
async def send_command(self, command, parameters: dict = None) -> dict:
# get reader and writer streams
reader, writer = await asyncio.open_connection(self.ip, self.port)