mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Use explicit return value in azure_event_hub (#79315)
* Use explicit return value in azure_event_hub * Use abstractmethod
This commit is contained in:
parent
7ae942a62b
commit
89d0b434bc
@ -1,6 +1,7 @@
|
|||||||
"""File for Azure Event Hub models."""
|
"""File for Azure Event Hub models."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -12,12 +13,13 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AzureEventHubClient:
|
class AzureEventHubClient(ABC):
|
||||||
"""Class for the Azure Event Hub client. Use from_input to initialize."""
|
"""Class for the Azure Event Hub client. Use from_input to initialize."""
|
||||||
|
|
||||||
event_hub_instance_name: str
|
event_hub_instance_name: str
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@abstractmethod
|
||||||
def client(self) -> EventHubProducerClient:
|
def client(self) -> EventHubProducerClient:
|
||||||
"""Return the client."""
|
"""Return the client."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user