Skip to content

Commit

Permalink
black code
Browse files Browse the repository at this point in the history
  • Loading branch information
dotX12 committed Feb 17, 2024
1 parent 6020fdd commit 315b3bf
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 8 deletions.
101 changes: 99 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pydantic = "^1.10.2"
shazamio-core = "^1.0.1"
aiohttp-retry = "^2.8.3"

[tool.poetry.group.dev.dependencies]
black = {version = "^24.2.0", allow-prereleases = true}

[build-system]
requires = ["poetry-core>=1.0.0", "wheel>=0.36,<1.0"]
build-backend = "poetry.core.masonry.api"
Expand Down
1 change: 0 additions & 1 deletion shazamio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ async def request(
raise e
else:
raise BadMethod("Accept only GET/POST")
await client.close()
5 changes: 2 additions & 3 deletions shazamio/interfaces/client.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import abc
from abc import ABC
from abc import ABC, abstractmethod
from typing import Any


class HTTPClientInterface(ABC):
@abc.abstractmethod
@abstractmethod
async def request(
self,
method: str,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def song_bytes():
@pytest.mark.asyncio
async def test_recognize_song_file():
shazam = Shazam()
out = await shazam.recognize_song(data="examples/data/dora.ogg")
out = await shazam.recognize(data="examples/data/dora.ogg")

assert out.get("matches") != []
assert out["track"]["key"] == "549679333"
Expand All @@ -24,7 +24,7 @@ async def test_recognize_song_file():
@pytest.mark.asyncio
async def test_recognize_song_bytes(song_bytes: bytes):
shazam = Shazam()
out = await shazam.recognize_song(data=song_bytes)
out = await shazam.recognize(data=song_bytes)

assert out.get("matches") != []
assert out["track"]["key"] == "549679333"
Expand Down

0 comments on commit 315b3bf

Please sign in to comment.