Skip to content

Commit 1c85e97

Browse files
committed
Fix linting
1 parent 672a335 commit 1c85e97

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/cinder/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ async def get_decision_reports(self, decision_id: str) -> list[Report]:
206206
Raises:
207207
httpx.HTTPStatusError: If the request fails or decision not found
208208
"""
209-
response = await self.client.get(
210-
f"/api/v2/decisions/{decision_id}/reports/"
211-
)
209+
response = await self.client.get(f"/api/v2/decisions/{decision_id}/reports/")
212210
response.raise_for_status()
213211
return [Report.model_validate(item) for item in response.json()]
214212

src/cinder/sync_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ def get_decision_reports(self, decision_id: str) -> list[Report]:
207207
Raises:
208208
httpx.HTTPStatusError: If the request fails or decision not found
209209
"""
210-
response = self.client.get(
211-
f"/api/v2/decisions/{decision_id}/reports/"
212-
)
210+
response = self.client.get(f"/api/v2/decisions/{decision_id}/reports/")
213211
response.raise_for_status()
214212
return [Report.model_validate(item) for item in response.json()]
215213

tests/test_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ async def test_get_decision_reports_empty(self, client):
462462
@respx.mock
463463
async def test_get_decision_reports_not_found(self, client):
464464
"""Test handling of 404 when decision does not exist."""
465-
respx.get(
466-
"https://api.example.com/api/v2/decisions/nonexistent/reports/"
467-
).mock(return_value=Response(404, json={"detail": "Not found"}))
465+
respx.get("https://api.example.com/api/v2/decisions/nonexistent/reports/").mock(
466+
return_value=Response(404, json={"detail": "Not found"})
467+
)
468468

469469
async with client:
470470
with pytest.raises(Exception) as exc_info:

tests/test_sync_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ def test_get_decision_reports_empty(self, client):
320320
@respx.mock
321321
def test_get_decision_reports_not_found(self, client):
322322
"""Test handling of 404 when decision does not exist."""
323-
respx.get(
324-
"https://api.example.com/api/v2/decisions/nonexistent/reports/"
325-
).mock(return_value=Response(404, json={"detail": "Not found"}))
323+
respx.get("https://api.example.com/api/v2/decisions/nonexistent/reports/").mock(
324+
return_value=Response(404, json={"detail": "Not found"})
325+
)
326326

327327
with client:
328328
with pytest.raises(Exception) as exc_info:

0 commit comments

Comments
 (0)