| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
"""Constants and Enums for the asynceapi package.""" |
| 5 |
|
| 6 |
from __future__ import annotations |
| 7 |
|
| 8 |
from enum import Enum |
| 9 |
|
| 10 |
|
| 11 |
class EapiCommandFormat(str, Enum): |
| 12 |
"""Enum for the eAPI command format. |
| 13 |
|
| 14 |
NOTE: This could be updated to StrEnum when Python 3.11 is the minimum supported version in ANTA. |
| 15 |
""" |
| 16 |
|
| 17 |
JSON = "json" |
| 18 |
TEXT = "text" |
| 19 |
|
| 20 |
def __str__(self) -> str: |
| 21 |
"""Override the __str__ method to return the value of the Enum, mimicking the behavior of StrEnum.""" |
| 22 |
return self.value |