Skip to content

Commit b1bbcfe

Browse files
committed
fix: linting issues
1 parent 9d537d6 commit b1bbcfe

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

eventsourcingdb_client_python/handlers/ping.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ async def ping(client: AbstractBaseClient) -> None:
1313

1414
if response.status_code != HTTPStatus.OK:
1515
raise ServerError(f'Received unexpected response: {response_body}')
16-
16+
1717
# Check old format (plain "OK")
1818
if response_body == OK_RESPONSE:
1919
return
20-
21-
# Check new format (JSON {"status":"ok"})
20+
2221
try:
2322
response_json = json.loads(response_body)
24-
if isinstance(response_json, dict) and response_json.get('status') == STATUS_OK:
25-
return
2623
except json.JSONDecodeError:
2724
pass
28-
25+
else:
26+
if isinstance(response_json, dict) and response_json.get('status') == STATUS_OK:
27+
return
28+
2929
raise ServerError(f'Received unexpected response: {response_body}')

tests/shared/start_local_http_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def ping_app() -> RetryResult[None]:
4848
async with session:
4949
try:
5050
response = await session.get(
51-
f'http://localhost:{local_http_server.port}/__python_test__/api/v1/ping', timeout=aiohttp.ClientTimeout(total=1)
51+
f'http://localhost:{local_http_server.port}/__python_test__/api/v1/ping', timeout=aiohttp.ClientTimeout(total=1) # noqa: E501
5252
)
5353
except aiohttp.ClientError as error:
5454
return Retry(cause=error)

0 commit comments

Comments
 (0)