format: Reformat some files.
This commit is contained in:
@@ -22,6 +22,7 @@ import copy
|
|||||||
|
|
||||||
from .error_codes import X19Error, WhatsminerError, BraiinsOSError, InnosiliconError
|
from .error_codes import X19Error, WhatsminerError, BraiinsOSError, InnosiliconError
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class HashBoard:
|
class HashBoard:
|
||||||
slot: int = 0
|
slot: int = 0
|
||||||
@@ -122,7 +123,6 @@ class MinerData:
|
|||||||
fault_light: Union[bool, None] = None
|
fault_light: Union[bool, None] = None
|
||||||
efficiency: int = field(init=False)
|
efficiency: int = field(init=False)
|
||||||
|
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
self.datetime = datetime.now(timezone.utc).astimezone()
|
self.datetime = datetime.now(timezone.utc).astimezone()
|
||||||
|
|
||||||
@@ -284,6 +284,7 @@ class MinerData:
|
|||||||
@right_board_temp.setter
|
@right_board_temp.setter
|
||||||
def right_board_temp(self, val):
|
def right_board_temp(self, val):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def left_board_chip_temp(self): # noqa - Skip PyCharm inspection
|
def left_board_chip_temp(self): # noqa - Skip PyCharm inspection
|
||||||
if len(self.hashboards) in [2, 3]:
|
if len(self.hashboards) in [2, 3]:
|
||||||
|
|||||||
@@ -478,7 +478,6 @@ class BOSMiner(BaseMiner):
|
|||||||
else:
|
else:
|
||||||
data.hashboards[_id].missing = True
|
data.hashboards[_id].missing = True
|
||||||
|
|
||||||
|
|
||||||
if devs:
|
if devs:
|
||||||
boards = devs[0].get("DEVS")
|
boards = devs[0].get("DEVS")
|
||||||
if boards:
|
if boards:
|
||||||
|
|||||||
@@ -247,7 +247,9 @@ class BTMiner(BaseMiner):
|
|||||||
A [`MinerData`][pyasic.data.MinerData] instance containing the miners data.
|
A [`MinerData`][pyasic.data.MinerData] instance containing the miners data.
|
||||||
"""
|
"""
|
||||||
data = MinerData(
|
data = MinerData(
|
||||||
ip=str(self.ip), ideal_chips=self.nominal_chips * self.ideal_hashboards, ideal_hashboards=self.ideal_hashboards,
|
ip=str(self.ip),
|
||||||
|
ideal_chips=self.nominal_chips * self.ideal_hashboards,
|
||||||
|
ideal_hashboards=self.ideal_hashboards,
|
||||||
)
|
)
|
||||||
|
|
||||||
mac = None
|
mac = None
|
||||||
|
|||||||
@@ -179,10 +179,12 @@ class CGMiner(BaseMiner):
|
|||||||
Returns:
|
Returns:
|
||||||
A [`MinerData`][pyasic.data.MinerData] instance containing the miners data.
|
A [`MinerData`][pyasic.data.MinerData] instance containing the miners data.
|
||||||
"""
|
"""
|
||||||
data = MinerData(ip=str(self.ip), ideal_chips=self.nominal_chips * self.ideal_hashboards, ideal_hashboards=self.ideal_hashboards,
|
data = MinerData(
|
||||||
|
ip=str(self.ip),
|
||||||
|
ideal_chips=self.nominal_chips * self.ideal_hashboards,
|
||||||
|
ideal_hashboards=self.ideal_hashboards,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
board_offset = -1
|
board_offset = -1
|
||||||
fan_offset = -1
|
fan_offset = -1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user