refactor: remove some unused pass statements.

This commit is contained in:
UpstreamData
2024-01-15 16:16:08 -07:00
parent 2b82b29690
commit 832a276f4b
3 changed files with 2 additions and 12 deletions

View File

@@ -744,7 +744,7 @@ class BOSer(BaseMiner):
return await self.restart_boser() return await self.restart_boser()
async def restart_boser(self) -> bool: async def restart_boser(self) -> bool:
ret = await self.web.grpc.restart() await self.web.grpc.restart()
return True return True
async def stop_mining(self) -> bool: async def stop_mining(self) -> bool:

View File

@@ -181,8 +181,7 @@ class VNish(BMMiner):
return round( return round(
float(float(api_summary["SUMMARY"][0]["GHS 5s"]) / 1000), 2 float(float(api_summary["SUMMARY"][0]["GHS 5s"]) / 1000), 2
) )
except (LookupError, ValueError, TypeError) as e: except (LookupError, ValueError, TypeError):
logger.error(e)
pass pass
async def _get_wattage_limit(self, web_settings: dict = None) -> Optional[int]: async def _get_wattage_limit(self, web_settings: dict = None) -> Optional[int]:

View File

@@ -231,7 +231,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of turning the light on. A boolean value of the success of turning the light on.
""" """
pass
@abstractmethod @abstractmethod
async def fault_light_off(self) -> bool: async def fault_light_off(self) -> bool:
@@ -240,7 +239,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of turning the light off. A boolean value of the success of turning the light off.
""" """
pass
@abstractmethod @abstractmethod
async def get_config(self) -> MinerConfig: async def get_config(self) -> MinerConfig:
@@ -250,7 +248,6 @@ class BaseMiner(ABC):
Returns: Returns:
A [`MinerConfig`][pyasic.config.MinerConfig] containing the pool information and mining configuration. A [`MinerConfig`][pyasic.config.MinerConfig] containing the pool information and mining configuration.
""" """
pass
@abstractmethod @abstractmethod
async def reboot(self) -> bool: async def reboot(self) -> bool:
@@ -259,7 +256,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of rebooting the miner. A boolean value of the success of rebooting the miner.
""" """
pass
@abstractmethod @abstractmethod
async def restart_backend(self) -> bool: async def restart_backend(self) -> bool:
@@ -268,7 +264,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of restarting the mining process. A boolean value of the success of restarting the mining process.
""" """
pass
@abstractmethod @abstractmethod
async def send_config(self, config: MinerConfig, user_suffix: str = None) -> None: async def send_config(self, config: MinerConfig, user_suffix: str = None) -> None:
@@ -278,7 +273,6 @@ class BaseMiner(ABC):
config: A [`MinerConfig`][pyasic.config.MinerConfig] containing the mining config you want to switch the miner to. config: A [`MinerConfig`][pyasic.config.MinerConfig] containing the mining config you want to switch the miner to.
user_suffix: A suffix to append to the username when sending to the miner. user_suffix: A suffix to append to the username when sending to the miner.
""" """
return None
@abstractmethod @abstractmethod
async def stop_mining(self) -> bool: async def stop_mining(self) -> bool:
@@ -287,7 +281,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of stopping the mining process. A boolean value of the success of stopping the mining process.
""" """
pass
@abstractmethod @abstractmethod
async def resume_mining(self) -> bool: async def resume_mining(self) -> bool:
@@ -296,7 +289,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of resuming the mining process. A boolean value of the success of resuming the mining process.
""" """
pass
@abstractmethod @abstractmethod
async def set_power_limit(self, wattage: int) -> bool: async def set_power_limit(self, wattage: int) -> bool:
@@ -308,7 +300,6 @@ class BaseMiner(ABC):
Returns: Returns:
A boolean value of the success of setting the power limit. A boolean value of the success of setting the power limit.
""" """
pass
################################################## ##################################################
### DATA GATHERING FUNCTIONS (get_{some_data}) ### ### DATA GATHERING FUNCTIONS (get_{some_data}) ###