bug: fix some issues, and remove unused imports.

This commit is contained in:
UpstreamData
2023-12-11 13:48:26 -07:00
parent c919b00312
commit 27368a9bd2
3 changed files with 3 additions and 4 deletions

View File

@@ -15,8 +15,6 @@
# ------------------------------------------------------------------------------
from dataclasses import asdict, dataclass
import toml
from pyasic.config.fans import FanModeConfig
from pyasic.config.mining import MiningModeConfig
from pyasic.config.pools import PoolConfig

View File

@@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from abc import ABC, abstractmethod
from dataclasses import asdict, dataclass
from enum import Enum
from typing import Union

View File

@@ -94,7 +94,9 @@ class PowerScalingEnabled(MinerConfigValue):
mode: str = field(init=False, default="enabled")
power_step: int = None
minimum_power: int = None
shutdown_enabled: PowerScalingShutdown = None
shutdown_enabled: Union[
PowerScalingShutdownEnabled, PowerScalingShutdownDisabled
] = None
@classmethod
def from_bosminer(cls, power_scaling_conf: dict) -> "PowerScalingEnabled":