fix: Standardize isort command in CI workflows
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 37s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m16s
Integration Tests / integration-tests (push) Failing after 58s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 12s
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m42s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 46s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 47s
Service Adapters (Python FastAPI) / build (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m53s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 45s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 28s
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 37s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m16s
Integration Tests / integration-tests (push) Failing after 58s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 12s
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m42s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 46s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 47s
Service Adapters (Python FastAPI) / build (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m53s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 45s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 28s
### Summary of Changes - Updated the `isort` command in both CI workflows to include the `--profile black` option for consistent code formatting. - Refactored function definitions in service adapters to improve readability by consolidating parameters into single lines. ### Expected Results - Enhanced consistency in code formatting checks across CI workflows, ensuring adherence to the Black style guide. - Improved readability and maintainability of function definitions in service adapters.
This commit is contained in:
@@ -217,16 +217,12 @@ async def get_ha_entities():
|
||||
HAEntity(
|
||||
entity_id="sensor.cpu_usage",
|
||||
state="45.2",
|
||||
attributes=HAAttributes(
|
||||
unit_of_measurement="%", friendly_name="CPU Usage"
|
||||
),
|
||||
attributes=HAAttributes(unit_of_measurement="%", friendly_name="CPU Usage"),
|
||||
),
|
||||
HAEntity(
|
||||
entity_id="sensor.memory_usage",
|
||||
state="2.1",
|
||||
attributes=HAAttributes(
|
||||
unit_of_measurement="GB", friendly_name="Memory Usage"
|
||||
),
|
||||
attributes=HAAttributes(unit_of_measurement="GB", friendly_name="Memory Usage"),
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -340,11 +336,7 @@ async def publish_event(event_data: EventData, background_tasks: BackgroundTasks
|
||||
},
|
||||
tags=["Events"],
|
||||
)
|
||||
async def get_events(
|
||||
limit: int = Query(
|
||||
100, ge=1, le=1000, description="Maximum number of events to retrieve"
|
||||
)
|
||||
):
|
||||
async def get_events(limit: int = Query(100, ge=1, le=1000, description="Maximum number of events to retrieve")):
|
||||
"""Get recent events from the Redis message bus"""
|
||||
try:
|
||||
events = redis_client.lrange("events", 0, limit - 1)
|
||||
@@ -386,9 +378,7 @@ async def get_ha_entity(entity_id: str = Path(..., description="Entity ID")):
|
||||
return HAEntity(
|
||||
entity_id=entity_id,
|
||||
state="unknown",
|
||||
attributes=HAAttributes(
|
||||
unit_of_measurement="", friendly_name=f"Entity {entity_id}"
|
||||
),
|
||||
attributes=HAAttributes(unit_of_measurement="", friendly_name=f"Entity {entity_id}"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user