From b7d22c4a28f6afe80902a2ba4e13a6dff5aefb83 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Fri, 8 Mar 2024 00:46:56 +0100 Subject: [PATCH] Update code with Ruff format --- src/odp_gent/models.py | 1 + src/odp_gent/odp_gent.py | 1 + tests/__init__.py | 1 + tests/test_gent.py | 14 +++++++++----- tests/test_models.py | 1 + 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/odp_gent/models.py b/src/odp_gent/models.py index 431fd41..bf28a12 100644 --- a/src/odp_gent/models.py +++ b/src/odp_gent/models.py @@ -1,4 +1,5 @@ """Models for Open Data Platform of Gent.""" + from __future__ import annotations import json diff --git a/src/odp_gent/odp_gent.py b/src/odp_gent/odp_gent.py index bb21e4f..095510e 100644 --- a/src/odp_gent/odp_gent.py +++ b/src/odp_gent/odp_gent.py @@ -1,4 +1,5 @@ """Asynchronous Python client providing Open Data information of Gent.""" + from __future__ import annotations import asyncio diff --git a/tests/__init__.py b/tests/__init__.py index fd86e93..de737d2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,5 @@ """Asynchronous Python client providing Open Data information of Gent.""" + from pathlib import Path diff --git a/tests/test_gent.py b/tests/test_gent.py index c076220..75451c4 100644 --- a/tests/test_gent.py +++ b/tests/test_gent.py @@ -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 @@ -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") diff --git a/tests/test_models.py b/tests/test_models.py index 4ab3aca..b90b70a 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,4 +1,5 @@ """Test the models.""" + from __future__ import annotations from aiohttp import ClientSession