Skip to content

Commit 52d95f1

Browse files
CI workflow fixes
1 parent a6da6ee commit 52d95f1

7 files changed

Lines changed: 10 additions & 19 deletions

File tree

‎src/eve_api/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
TokenExpiredError,
1515
ValidationError,
1616
)
17+
1718
__all__ = [
1819
"__version__",
1920
"EVEClient",

‎src/eve_api/auth.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
from __future__ import annotations
44

55
from datetime import datetime, timedelta, timezone
6+
from http import HTTPStatus
67
from typing import Any
78

89
import httpx
910

10-
from http import HTTPStatus
11-
1211
from .exceptions import (
1312
AuthenticationError,
1413
NotAuthenticatedError,

‎src/eve_api/client.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
import json as _json
66
from collections.abc import AsyncIterator
7+
from http import HTTPStatus
78
from typing import Any
89

910
import httpx
1011

1112
from .auth import EVEAuth
12-
from http import HTTPStatus
13-
1413
from .exceptions import (
1514
APIError,
1615
ForbiddenError,

‎src/eve_api/exceptions.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Any
6-
75
from http import HTTPStatus
6+
from typing import Any
87

98

109
class EVEError(Exception):

‎tests/conftest.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Pytest configuration and fixtures for eve-api tests."""
22

3+
from http import HTTPStatus
4+
35
import pytest
46
import respx
57
from httpx import Response
68

7-
from http import HTTPStatus
8-
99
from eve_api import EVEClient
1010

1111

‎tests/test_auth.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"""Tests for the EVEAuth."""
22

33
from datetime import datetime, timedelta, timezone
4+
from http import HTTPStatus
45
from unittest.mock import AsyncMock, MagicMock, patch
56

67
import httpx
78
import pytest
89

9-
from http import HTTPStatus
10-
1110
from eve_api.auth import (
1211
AuthenticationError,
1312
EVEAuth,

‎tests/test_client.py‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""Tests for the EVEClient."""
22

33
import json
4+
from http import HTTPStatus
45

56
import pytest
67
from httpx import Response
78

8-
from http import HTTPStatus
9-
109
from eve_api import (
1110
APIError,
1211
AuthenticationError,
@@ -214,9 +213,7 @@ async def test_request_no_auth(mock_api, client: EVEClient):
214213
"""Test EVEClient when auth_required=False"""
215214
status = "ok"
216215
mock_api.get("/health").mock(
217-
return_value=Response(
218-
HTTPStatus.OK, json={"status": status}
219-
)
216+
return_value=Response(HTTPStatus.OK, json={"status": status})
220217
)
221218

222219
response = await client.request("GET", "/health", auth_required=False)
@@ -297,10 +294,7 @@ async def test_500_raises_server_error(
297294
with pytest.raises(ServerError) as exc_info:
298295
await authenticated_client.get("/broken")
299296

300-
assert (
301-
exc_info.value.status_code
302-
== HTTPStatus.INTERNAL_SERVER_ERROR
303-
)
297+
assert exc_info.value.status_code == HTTPStatus.INTERNAL_SERVER_ERROR
304298

305299

306300
async def test_422_raises_api_error(mock_api, authenticated_client: EVEClient):

0 commit comments

Comments
 (0)