Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD3y5eL committed Dec 27, 2024
1 parent 619e2c5 commit b6eb270
Show file tree
Hide file tree
Showing 17 changed files with 2,124 additions and 1,219 deletions.
3 changes: 3 additions & 0 deletions custom_components/unraid/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .smart_operations import SmartDataManager
from .disk_state import DiskStateManager, DiskState
from .disk_utils import is_valid_disk_name
from .disk_mapping import get_unraid_disk_mapping, get_disk_info

__all__ = [
"DiskOperationsMixin",
Expand All @@ -23,4 +24,6 @@
"DiskStateManager",
"DiskState",
"is_valid_disk_name",
"get_unraid_disk_mapping",
"get_disk_info",
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Dict, Any
import logging

from .helpers import format_bytes
from ..helpers import format_bytes

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/unraid/api/disk_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from datetime import datetime

from .disk_utils import is_valid_disk_name
from ..disk_mapping import parse_disk_config, parse_disks_ini
from .disk_mapping import parse_disk_config, parse_disks_ini
from .smart_operations import SmartDataManager
from .disk_state import DiskState, DiskStateManager

Expand Down
2 changes: 1 addition & 1 deletion custom_components/unraid/api/disk_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ def get_spindown_delay(self, disk_name: str) -> int:
return self._spindown_delays.get(
disk_name,
self._spindown_delays.get("default", 1800)
)
)
Loading

0 comments on commit b6eb270

Please sign in to comment.