Skip to content

Commit bd7b57e

Browse files
⬆️ Update dependency ruff to v0.8.0 (#401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Joostlek <[email protected]>
1 parent c9842fa commit bd7b57e

File tree

7 files changed

+55
-52
lines changed

7 files changed

+55
-52
lines changed

poetry.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pylint = "3.3.1"
4242
pytest = "8.3.3"
4343
pytest-asyncio = "0.24.0"
4444
pytest-cov = "6.0.0"
45-
ruff = "0.7.3"
45+
ruff = "0.8.0"
4646
safety = "3.2.11"
4747
yamllint = "1.35.1"
4848
syrupy = "4.8.0"
@@ -135,8 +135,6 @@ asyncio_mode = "auto"
135135

136136
[tool.ruff.lint]
137137
ignore = [
138-
"ANN101", # Self... explanatory
139-
"ANN102", # cls... just as useless
140138
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
141139
"COM812", # Conflicts with formatter
142140
"D203", # Conflicts with other rules

src/spotifyaio/__init__.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,35 @@
3737
from .spotify import SpotifyClient
3838

3939
__all__ = [
40+
"Album",
41+
"AlbumType",
42+
"Artist",
43+
"BasePlaylist",
44+
"BaseUserProfile",
45+
"Context",
46+
"ContextType",
47+
"CurrentPlaying",
4048
"Device",
4149
"DeviceType",
42-
"RepeatMode",
43-
"ContextType",
44-
"Context",
45-
"AlbumType",
50+
"Episode",
4651
"Image",
47-
"ReleaseDatePrecision",
48-
"SimplifiedArtist",
49-
"SimplifiedAlbum",
50-
"Album",
51-
"Artist",
52-
"Track",
53-
"SimplifiedTrack",
54-
"ItemType",
5552
"Item",
56-
"CurrentPlaying",
53+
"ItemType",
5754
"PlaybackState",
58-
"PlaylistOwnerType",
59-
"PlaylistOwner",
6055
"Playlist",
61-
"BasePlaylist",
56+
"PlaylistOwner",
57+
"PlaylistOwnerType",
6258
"ProductType",
63-
"BaseUserProfile",
64-
"UserProfile",
65-
"Episode",
59+
"ReleaseDatePrecision",
60+
"RepeatMode",
6661
"Show",
67-
"SpotifyError",
68-
"SpotifyConnectionError",
62+
"SimplifiedAlbum",
63+
"SimplifiedArtist",
64+
"SimplifiedTrack",
6965
"SpotifyAuthenticationFailedError",
7066
"SpotifyClient",
67+
"SpotifyConnectionError",
68+
"SpotifyError",
69+
"Track",
70+
"UserProfile",
7171
]

src/spotifyaio/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from __future__ import annotations
44

55
from dataclasses import dataclass, field
6-
from datetime import datetime # noqa: TCH003
6+
from datetime import datetime # noqa: TC003
77
from enum import IntEnum, StrEnum
88
from typing import Annotated, Any
99

1010
from mashumaro import field_options
1111
from mashumaro.mixins.orjson import DataClassORJSONMixin
12-
from mashumaro.types import Discriminator # noqa: TCH002
12+
from mashumaro.types import Discriminator
1313

1414

1515
class DeviceType(StrEnum):

src/spotifyaio/spotify.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import asyncio
66
from dataclasses import dataclass
77
from importlib import metadata
8-
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Self
8+
from typing import TYPE_CHECKING, Any, Callable, Self
99

1010
from aiohttp import ClientSession
1111
from aiohttp.hdrs import METH_DELETE, METH_GET, METH_POST, METH_PUT
@@ -56,6 +56,8 @@
5656
from spotifyaio.util import get_identifier
5757

5858
if TYPE_CHECKING:
59+
from collections.abc import Awaitable
60+
5961
from spotifyaio import SimplifiedAlbum, SimplifiedTrack, Track
6062

6163
VERSION = metadata.version(__package__)

tests/conftest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Asynchronous Python client for Spotify."""
22

3-
from typing import AsyncGenerator, Generator
3+
from collections.abc import AsyncGenerator, Generator
44

55
import aiohttp
66
from aioresponses import aioresponses
@@ -21,9 +21,12 @@ def snapshot_assertion(snapshot: SnapshotAssertion) -> SnapshotAssertion:
2121
@pytest.fixture(name="spotify_client")
2222
async def client() -> AsyncGenerator[SpotifyClient, None]:
2323
"""Return a Spotify client."""
24-
async with aiohttp.ClientSession() as session, SpotifyClient(
25-
session=session,
26-
) as spotify_client:
24+
async with (
25+
aiohttp.ClientSession() as session,
26+
SpotifyClient(
27+
session=session,
28+
) as spotify_client,
29+
):
2730
yield spotify_client
2831

2932

tests/ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ lint.extend-ignore = [
1010
"S105", # Detection of passwords...
1111
"S106", # Detection of passwords...
1212
"SLF001", # Tests will access private/protected members...
13-
"TCH002", # pytest doesn't like this one...
13+
"TC002", # pytest doesn't like this one...
1414
"PLR0913", # we're overwriting function that has many arguments
1515
]

0 commit comments

Comments
 (0)