improve some type hinting compatibility

This commit is contained in:
UpstreamData
2022-07-20 11:19:13 -06:00
parent 2e3991355b
commit 3d3064d78e
2 changed files with 10 additions and 6 deletions

View File

@@ -15,6 +15,7 @@
from pyasic.miners._backends import BMMiner # noqa - Ignore access to _module
import httpx
from typing import Union
class BMMinerX17(BMMiner):
@@ -22,7 +23,7 @@ class BMMinerX17(BMMiner):
super().__init__(ip)
self.ip = ip
async def get_hostname(self) -> str or None:
async def get_hostname(self) -> Union[str, None]:
hostname = None
url = f"http://{self.ip}/cgi-bin/get_system_info.cgi"
auth = httpx.DigestAuth("root", "root")