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 authored and renovate[bot] committed Mar 4, 2024
1 parent ab60c67 commit e512a86
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/disabled_parkings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pylint: disable=W0621
"""Asynchronous Python client providing Open Data information of Liège."""

from __future__ import annotations

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

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions src/liege/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for Open Data Platform of Liège."""

from __future__ import annotations

from dataclasses import dataclass
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 Liège."""

from pathlib import Path


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

# pylint: disable=protected-access
import asyncio
from unittest.mock import patch
Expand Down Expand Up @@ -102,9 +103,12 @@ async def test_client_error() -> None:
"""Test request client error from the Open Data Platform API of Liège."""
async with aiohttp.ClientSession() as session:
client = ODPLiege(session=session)
with patch.object(
session,
"request",
side_effect=aiohttp.ClientError,
), pytest.raises(ODPLiegeConnectionError):
with (
patch.object(
session,
"request",
side_effect=aiohttp.ClientError,
),
pytest.raises(ODPLiegeConnectionError),
):
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

import aiohttp
Expand Down

0 comments on commit e512a86

Please sign in to comment.