Skip to content

Commit

Permalink
Update code with Ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas committed Mar 7, 2024
1 parent 057f741 commit e4b7df0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/odp_gent/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for Open Data Platform of Gent."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions src/odp_gent/odp_gent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Asynchronous Python client providing Open Data information of Gent."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Asynchronous Python client providing Open Data information of Gent."""

from pathlib import Path


Expand Down
14 changes: 9 additions & 5 deletions tests/test_gent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Basic tests for the Open Data Platform API of Gent."""

# pylint: disable=protected-access
import asyncio
from unittest.mock import patch
Expand Down Expand Up @@ -92,9 +93,12 @@ async def test_client_error() -> None:
"""Test request client error from the Open Data Platform API of Gent."""
async with ClientSession() as session:
client = ODPGent(session=session)
with patch.object(
session,
"request",
side_effect=ClientError,
), pytest.raises(ODPGentConnectionError):
with (
patch.object(
session,
"request",
side_effect=ClientError,
),
pytest.raises(ODPGentConnectionError),
):
assert await client._request("test")
1 change: 1 addition & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the models."""

from __future__ import annotations

from aiohttp import ClientSession
Expand Down

0 comments on commit e4b7df0

Please sign in to comment.