Use ternary operator for trivial assignment

This commit is contained in:
Hugo Osvaldo Barrera 2025-09-20 13:03:42 +02:00
parent 2e619806a0
commit 19120422a7

View file

@ -13,10 +13,7 @@ from vdirsyncer.http import UsageLimitReached, request
async def _create_mock_response(status: int, body: str | dict):
raw_body = body
if isinstance(body, dict):
text_body = json.dumps(body)
else:
text_body = body
text_body = json.dumps(body) if isinstance(body, dict) else body
mock_response = AsyncMock()
mock_response.status = status