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: fixed string enums for python 3.11 #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions custom_components/tattelecom_intercom/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ class DeviceClass(StrEnum):
CALL_STATE = f"{DOMAIN}__call_state"


class Method(str, Enum):
class Method(StrEnum):
"""Method enum"""

GET = "GET"
POST = "POST"


class ApiVersion(str, Enum):
class ApiVersion(StrEnum):
"""Api version enum"""

V1 = "v1"
V2 = "v2"


class CallState(str, Enum):
class CallState(StrEnum):
"""Call state enum"""

DIALING = "dialing"
Expand All @@ -41,7 +41,7 @@ class CallState(str, Enum):
ENDED = "ended"


class VoipState(str, Enum):
class VoipState(StrEnum):
"""Voip state enum"""

INACTIVE = "inactive"
Expand All @@ -64,15 +64,15 @@ def __new__(cls, value: int):
RESPONSE = 0


class RtpProtocol(str, Enum):
class RtpProtocol(StrEnum):
"""Rtp protocol"""

UDP = "udp"
AVP = "RTP/AVP"
SAVP = "RTP/SAVP"


class SendMode(str, Enum):
class SendMode(StrEnum):
"""Send mode"""

RECV_ONLY = "recvonly"
Expand Down Expand Up @@ -202,7 +202,7 @@ def __str__(self) -> str:
UNKNOWN = "UNKNOWN", 0, 0, "UNKNOWN CODEC"


class TransmitType(str, Enum):
class TransmitType(StrEnum):
"""Rtp transmit type"""

RECVONLY = "recvonly"
Expand Down