Skip to content

Commit

Permalink
⬆️ Update dependency ruff to v0.8.1 (#455)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joostlek <joostlek@outlook.com>
  • Loading branch information
renovate[bot] and joostlek authored Dec 2, 2024
1 parent 3b3448e commit 16bc378
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 285 deletions.
490 changes: 238 additions & 252 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pylint = "3.3.2"
pytest = "8.3.3"
pytest-asyncio = "0.24.0"
pytest-cov = "6.0.0"
ruff = "0.7.4"
ruff = "0.8.1"
safety = "3.2.11"
yamllint = "1.35.1"
syrupy = "4.8.0"
Expand Down Expand Up @@ -130,8 +130,6 @@ asyncio_mode = "auto"

[tool.ruff.lint]
ignore = [
"ANN101", # Self... explanatory
"ANN102", # cls... just as useless
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"COM812", # Conflicts with other rules
"D203", # Conflicts with other rules
Expand Down
48 changes: 24 additions & 24 deletions src/aiowithings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,43 @@
__all__ = [
"AUTHORIZATION_URL",
"TOKEN_URL",
"AuthScope",
"Activity",
"ActivityDataFields",
"ActivityDataOrigin",
"Activity",
"DeviceBattery",
"AuthScope",
"Device",
"DeviceType",
"DeviceBattery",
"DeviceModel",
"WithingsError",
"WithingsConnectionError",
"WithingsAuthenticationFailedError",
"WithingsInvalidParamsError",
"WithingsUnauthorizedError",
"WithingsErrorOccurredError",
"WithingsBadStateError",
"WithingsTooManyRequestsError",
"WithingsUnknownStatusError",
"WithingsClient",
"DeviceType",
"Goals",
"Measurement",
"MeasurementAttribution",
"MeasurementGroupCategory",
"MeasurementGroup",
"MeasurementGroupCategory",
"MeasurementPosition",
"MeasurementType",
"Measurement",
"get_measurement_type_from_notification_category",
"aggregate_measurements",
"NotificationCategory",
"Services",
"WebhookCall",
"SleepDataFields",
"SleepSeries",
"SleepSeriesTimeData",
"SleepState",
"SleepSummary",
"SleepSummaryDataFields",
"SleepState",
"SleepSeriesTimeData",
"SleepSeries",
"SleepDataFields",
"WorkoutDataFields",
"WebhookCall",
"WithingsAuthenticationFailedError",
"WithingsBadStateError",
"WithingsClient",
"WithingsConnectionError",
"WithingsError",
"WithingsErrorOccurredError",
"WithingsInvalidParamsError",
"WithingsTooManyRequestsError",
"WithingsUnauthorizedError",
"WithingsUnknownStatusError",
"Workout",
"WorkoutCategory",
"WorkoutDataFields",
"aggregate_measurements",
"get_measurement_type_from_notification_category",
]
3 changes: 2 additions & 1 deletion src/aiowithings/withings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import asyncio
from dataclasses import dataclass
from importlib import metadata
from typing import TYPE_CHECKING, Any, Awaitable, Callable, cast
from typing import TYPE_CHECKING, Any, Callable, cast

from aiohttp import ClientSession
from aiohttp.hdrs import METH_POST
Expand Down Expand Up @@ -50,6 +50,7 @@
)

if TYPE_CHECKING:
from collections.abc import Awaitable
from datetime import date, datetime

from typing_extensions import Self
Expand Down
11 changes: 7 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Asynchronous Python client for Withings."""

from typing import AsyncGenerator, Generator
from collections.abc import AsyncGenerator, Generator

import aiohttp
from aioresponses import aioresponses
Expand All @@ -21,9 +21,12 @@ def snapshot_assertion(snapshot: SnapshotAssertion) -> SnapshotAssertion:
@pytest.fixture(name="withings_client")
async def client() -> AsyncGenerator[WithingsClient, None]:
"""Return a Withings client."""
async with aiohttp.ClientSession() as session, WithingsClient(
session=session,
) as withings_client:
async with (
aiohttp.ClientSession() as session,
WithingsClient(
session=session,
) as withings_client,
):
yield withings_client


Expand Down
2 changes: 1 addition & 1 deletion tests/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ lint.extend-ignore = [
"S105", # Detection of passwords...
"S106", # Detection of passwords...
"SLF001", # Tests will access private/protected members...
"TCH002", # pytest doesn't like this one...
"TC002", # pytest doesn't like this one...
"PLR0913", # we're overwriting function that has many arguments
]

0 comments on commit 16bc378

Please sign in to comment.