Created copilot instructions and testing readRequests
This commit is contained in:
@@ -202,8 +202,7 @@ class AlpineBitsAction(ABC):
|
||||
|
||||
|
||||
class ServerCapabilities:
|
||||
"""Automatically discovers AlpineBitsAction implementations and generates capabilities.
|
||||
"""
|
||||
"""Automatically discovers AlpineBitsAction implementations and generates capabilities."""
|
||||
|
||||
def __init__(self):
|
||||
self.action_registry: dict[AlpineBitsActionName, type[AlpineBitsAction]] = {}
|
||||
@@ -237,9 +236,7 @@ class ServerCapabilities:
|
||||
return False
|
||||
|
||||
def create_capabilities_dict(self) -> None:
|
||||
"""Generate the capabilities dictionary based on discovered actions.
|
||||
|
||||
"""
|
||||
"""Generate the capabilities dictionary based on discovered actions."""
|
||||
versions_dict = {}
|
||||
|
||||
for action_enum, action_class in self.action_registry.items():
|
||||
@@ -287,10 +284,8 @@ class ServerCapabilities:
|
||||
if action.get("action") != "action_OTA_Ping"
|
||||
]
|
||||
|
||||
|
||||
def get_capabilities_dict(self) -> dict:
|
||||
"""Get capabilities as a dictionary. Generates if not already created.
|
||||
"""
|
||||
"""Get capabilities as a dictionary. Generates if not already created."""
|
||||
if self.capability_dict is None:
|
||||
self.create_capabilities_dict()
|
||||
return self.capability_dict
|
||||
@@ -615,7 +610,9 @@ class NotifReportReadAction(AlpineBitsAction):
|
||||
)
|
||||
|
||||
timestamp = datetime.now(ZoneInfo("UTC"))
|
||||
for entry in notif_report_details.hotel_notif_report.hotel_reservations.hotel_reservation: # type: ignore
|
||||
for entry in (
|
||||
notif_report_details.hotel_notif_report.hotel_reservations.hotel_reservation
|
||||
): # type: ignore
|
||||
unique_id = entry.unique_id.id
|
||||
acked_request = AckedRequest(
|
||||
unique_id=unique_id,
|
||||
|
||||
Reference in New Issue
Block a user