used isort + black
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from .serializers import Serialize
|
||||
from .api import Shazam
|
||||
from .converter import Geo
|
||||
from .enums import GenreMusic
|
||||
from .serializers import Serialize
|
||||
|
||||
__all__ = ("Serialize", "Shazam", "Geo", "GenreMusic")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from copy import copy
|
||||
from typing import List, Optional, Any
|
||||
from typing import Any, List, Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
from .enums import FrequencyBand
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import pathlib
|
||||
import uuid
|
||||
import time
|
||||
from typing import Optional
|
||||
import uuid
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from pydub import AudioSegment
|
||||
|
||||
from typing import Dict, Any, Union
|
||||
|
||||
from .misc import Request
|
||||
from .misc import ShazamUrl
|
||||
from .converter import Converter, Geo
|
||||
from .enums import GenreMusic
|
||||
from .misc import Request, ShazamUrl
|
||||
from .schemas.artists import ArtistQuery
|
||||
from .signature import DecodedMessage
|
||||
from .enums import GenreMusic
|
||||
from .converter import Converter, Geo
|
||||
from .typehints import CountryCode
|
||||
from .utils import ArtistQueryGenerator
|
||||
from .utils import get_song
|
||||
from .utils import ArtistQueryGenerator, get_song
|
||||
|
||||
|
||||
class Shazam(Converter, Geo, Request):
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import aiohttp
|
||||
|
||||
from shazamio.exceptions import BadMethod
|
||||
from shazamio.utils import validate_json
|
||||
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
from dataclass_factory import Factory
|
||||
|
||||
from shazamio.factory import FactorySchemas
|
||||
from shazamio.schemas.artists import ArtistInfo
|
||||
from shazamio.schemas.artists import ArtistV3
|
||||
from shazamio.schemas.artists import ArtistInfo, ArtistV3
|
||||
from shazamio.schemas.attributes import ArtistAttribute
|
||||
from shazamio.schemas.models import (
|
||||
SongSection,
|
||||
VideoSection,
|
||||
RelatedSection,
|
||||
LyricsSection,
|
||||
BeaconDataLyricsSection,
|
||||
ArtistSection,
|
||||
BeaconDataLyricsSection,
|
||||
LyricsSection,
|
||||
MatchModel,
|
||||
RelatedSection,
|
||||
ResponseTrack,
|
||||
SongSection,
|
||||
TrackInfo,
|
||||
VideoSection,
|
||||
YoutubeData,
|
||||
)
|
||||
from shazamio.schemas.models import TrackInfo
|
||||
from shazamio.schemas.models import YoutubeData
|
||||
from shazamio.schemas.models import ResponseTrack
|
||||
|
||||
|
||||
FACTORY_TRACK = Factory(
|
||||
schemas={
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from random import choice
|
||||
|
||||
from shazamio.user_agent import USER_AGENTS
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import annotations
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import annotations
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
@@ -3,10 +3,8 @@ from __future__ import annotations
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseHrefNextData
|
||||
from shazamio.schemas.base import BaseIdTypeHref
|
||||
from shazamio.schemas.base import BaseHrefNextData, BaseIdTypeHref
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import annotations
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import annotations
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.artist.views.top_music import PlayParams
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import field
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import Field
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from shazamio.schemas.artist.views.full_albums import FullAlbumsModel
|
||||
from shazamio.schemas.artist.views.last_release import LastReleaseModel
|
||||
from shazamio.schemas.artist.views.simular_artists import SimularArtist
|
||||
from shazamio.schemas.artist.views.top_music import TopMusicVideosView
|
||||
from shazamio.schemas.artist.views.top_song import TopSong
|
||||
from shazamio.schemas.attributes import ArtistAttribute
|
||||
from shazamio.schemas.enums import ArtistExtend
|
||||
from shazamio.schemas.enums import ArtistView
|
||||
from shazamio.schemas.enums import ArtistExtend, ArtistView
|
||||
from shazamio.schemas.errors import ErrorModel
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import Field
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class AttributeName(BaseModel):
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
from typing import Generic
|
||||
from typing import Optional
|
||||
from typing import TypeVar
|
||||
from typing import Generic, Optional, TypeVar
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic.generics import GenericModel
|
||||
|
||||
|
||||
T = TypeVar("T", bound=BaseModel)
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import field
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
from urllib.parse import urlencode
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import urlunparse
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List, Optional, Union
|
||||
from urllib.parse import urlencode, urlparse, urlunparse
|
||||
from uuid import UUID
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import Field
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class ImageModel(BaseModel):
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
from typing import Union
|
||||
|
||||
from shazamio.factory_misc import FACTORY_ARTIST
|
||||
from shazamio.factory_misc import FACTORY_TRACK
|
||||
from shazamio.schemas.artists import ArtistInfo
|
||||
from shazamio.schemas.artists import ArtistResponse
|
||||
from shazamio.schemas.artists import ArtistV2
|
||||
from shazamio.schemas.models import ResponseTrack
|
||||
from shazamio.schemas.models import TrackInfo
|
||||
from shazamio.schemas.models import YoutubeData
|
||||
from shazamio.factory_misc import FACTORY_ARTIST, FACTORY_TRACK
|
||||
from shazamio.schemas.artists import ArtistInfo, ArtistResponse, ArtistV2
|
||||
from shazamio.schemas.models import ResponseTrack, TrackInfo, YoutubeData
|
||||
|
||||
|
||||
class Serialize:
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from typing import Dict, List
|
||||
from base64 import b64decode, b64encode
|
||||
from math import exp, sqrt
|
||||
from binascii import crc32
|
||||
from io import BytesIO
|
||||
from ctypes import *
|
||||
from io import BytesIO
|
||||
from math import exp, sqrt
|
||||
from typing import Dict, List
|
||||
|
||||
from .enums import FrequencyBand, SampleRate
|
||||
|
||||
DATA_URI_PREFIX = "data:audio/vnd.shazam.sig;base64,"
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import pathlib
|
||||
from enum import Enum
|
||||
from io import BytesIO
|
||||
from typing import Dict
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
import aiofiles
|
||||
import aiohttp
|
||||
from aiohttp import ContentTypeError
|
||||
from pydub import AudioSegment
|
||||
|
||||
from shazamio.exceptions import FailedDecodeJson
|
||||
from shazamio.schemas.artists import ArtistQuery
|
||||
|
||||
|
||||
Reference in New Issue
Block a user