Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unused CentralBluetoothManager in models #138

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/habluetooth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

if TYPE_CHECKING:
from .base_scanner import BaseHaScanner
from .manager import BluetoothManager

_BluetoothServiceInfoSelfT = TypeVar(
"_BluetoothServiceInfoSelfT", bound="BluetoothServiceInfo"
Expand All @@ -30,24 +29,6 @@
_int = int # avoid cython conversion since we always want a pyint


class CentralBluetoothManager:
"""Central Bluetooth Manager."""

manager: BluetoothManager | None = None


def get_manager() -> BluetoothManager:
"""Get the BluetoothManager."""
if TYPE_CHECKING:
assert CentralBluetoothManager.manager is not None
return CentralBluetoothManager.manager


def set_manager(manager: BluetoothManager) -> None:
"""Set the BluetoothManager."""
CentralBluetoothManager.manager = manager


@dataclass(slots=True, frozen=True)
class HaBluetoothSlotAllocations:
"""Data for how to allocate slots for BLEDevice connections."""
Expand Down
Loading