From 395f7ed19fdea9e11df9f21467a1568e7c1d3495 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 27 Aug 2022 21:44:12 +0300 Subject: [PATCH] black formatting --- shazamio/api.py | 2 +- tests/test_recognize.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/shazamio/api.py b/shazamio/api.py index aabcc98..fdad6cb 100644 --- a/shazamio/api.py +++ b/shazamio/api.py @@ -269,7 +269,7 @@ async def recognize_song( signature = signature_generator.get_next_signature() if len(signature_generator.input_pending_processing) < 128: - return {'matches': []} + return {"matches": []} while not signature: signature = signature_generator.get_next_signature() diff --git a/tests/test_recognize.py b/tests/test_recognize.py index 13cb5f9..e5a24f5 100644 --- a/tests/test_recognize.py +++ b/tests/test_recognize.py @@ -6,7 +6,6 @@ from shazamio.utils import get_file_bytes - @pytest_asyncio.fixture(scope="session") async def song_bytes(): yield await get_file_bytes(file="examples/data/dora.ogg") @@ -29,14 +28,16 @@ async def test_recognize_song_bytes(song_bytes: bytes): async def test_recognize_song_too_short(): - short_audio_segment = AudioSegment.from_file(file=BytesIO(b'0'*126), - format='pcm', - sample_width=2, - frame_rate=16000, - channels=1) + short_audio_segment = AudioSegment.from_file( + file=BytesIO(b"0" * 126), + format="pcm", + sample_width=2, + frame_rate=16000, + channels=1, + ) shazam = Shazam() out = await shazam.recognize_song(data=short_audio_segment) assert out.get("matches") == [] - assert "track" not in out \ No newline at end of file + assert "track" not in out