mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Add slots to bluetooth matcher objects (#109768)
This commit is contained in:
parent
1e5ab3ad47
commit
cf188eabdf
@ -90,6 +90,8 @@ def seen_all_fields(
|
|||||||
class IntegrationMatcher:
|
class IntegrationMatcher:
|
||||||
"""Integration matcher for the bluetooth integration."""
|
"""Integration matcher for the bluetooth integration."""
|
||||||
|
|
||||||
|
__slots__ = ("_integration_matchers", "_matched", "_matched_connectable", "_index")
|
||||||
|
|
||||||
def __init__(self, integration_matchers: list[BluetoothMatcher]) -> None:
|
def __init__(self, integration_matchers: list[BluetoothMatcher]) -> None:
|
||||||
"""Initialize the matcher."""
|
"""Initialize the matcher."""
|
||||||
self._integration_matchers = integration_matchers
|
self._integration_matchers = integration_matchers
|
||||||
@ -159,6 +161,16 @@ class BluetoothMatcherIndexBase(Generic[_T]):
|
|||||||
any bucket and we can quickly reject the service info as not matching.
|
any bucket and we can quickly reject the service info as not matching.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__slots__ = (
|
||||||
|
"local_name",
|
||||||
|
"service_uuid",
|
||||||
|
"service_data_uuid",
|
||||||
|
"manufacturer_id",
|
||||||
|
"service_uuid_set",
|
||||||
|
"service_data_uuid_set",
|
||||||
|
"manufacturer_id_set",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Initialize the matcher index."""
|
"""Initialize the matcher index."""
|
||||||
self.local_name: dict[str, list[_T]] = {}
|
self.local_name: dict[str, list[_T]] = {}
|
||||||
@ -285,6 +297,8 @@ class BluetoothCallbackMatcherIndex(
|
|||||||
Supports matching on addresses.
|
Supports matching on addresses.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__slots__ = ("address", "connectable")
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Initialize the matcher index."""
|
"""Initialize the matcher index."""
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user