improved format and readability
This commit is contained in:
@@ -2,7 +2,7 @@ from API import BaseMinerAPI
|
||||
|
||||
|
||||
class BMMinerAPI(BaseMinerAPI):
|
||||
def __init__(self, ip, port=4028):
|
||||
def __init__(self, ip: str, port: int = 4028) -> None:
|
||||
super().__init__(ip, port)
|
||||
|
||||
async def version(self) -> dict:
|
||||
@@ -42,7 +42,7 @@ class BMMinerAPI(BaseMinerAPI):
|
||||
return await self.send_command("addpool", parameters=f"{url}, {username}, {password}")
|
||||
|
||||
async def poolpriority(self, *n: int) -> dict:
|
||||
return await self.send_command("poolpriority", parameters=f"{','.join(n)}")
|
||||
return await self.send_command("poolpriority", parameters=f"{','.join([str(item) for item in n])}")
|
||||
|
||||
async def poolquota(self, n: int, q: int) -> dict:
|
||||
return await self.send_command("poolquota", parameters=f"{n}, {q}")
|
||||
@@ -96,7 +96,7 @@ class BMMinerAPI(BaseMinerAPI):
|
||||
return await self.send_command("check", parameters=command)
|
||||
|
||||
async def failover_only(self, failover: bool) -> dict:
|
||||
return self.send_command("failover-only", parameters=failover)
|
||||
return await self.send_command("failover-only", parameters=failover)
|
||||
|
||||
async def coin(self) -> dict:
|
||||
return await self.send_command("coin")
|
||||
|
||||
Reference in New Issue
Block a user