Restyled by isort

This commit is contained in:
Restyled.io 2021-05-26 10:58:21 +00:00
parent a983542afc
commit cf92934c82
21 changed files with 61 additions and 99 deletions

View File

@ -1,6 +1,7 @@
from librespot.proto.Keyexchange_pb2 import *
import platform
from librespot.proto.Keyexchange_pb2 import *
class Version:
version = "0.0.1-SNAPSHOT"

View File

@ -4,16 +4,13 @@ import concurrent.futures
import random
import socket
from zeroconf import ServiceBrowser
from zeroconf import ServiceInfo
from zeroconf import Zeroconf
from zeroconf import ServiceBrowser, ServiceInfo, Zeroconf
from librespot.common import Utils
from librespot.core import Session
from librespot.crypto import DiffieHellman
from librespot.proto import Connect_pb2 as Connect
from librespot.standard import Closeable
from librespot.standard import Runnable
from librespot.standard import Closeable, Runnable
class ZeroconfServer(Closeable):

View File

@ -10,8 +10,7 @@ from librespot.common import Utils
from librespot.core import Session
from librespot.core.PacketsReceiver import PacketsReceiver
from librespot.crypto import Packet
from librespot.standard import ByteArrayOutputStream
from librespot.standard import BytesInputStream
from librespot.standard import ByteArrayOutputStream, BytesInputStream
class AudioKeyManager(PacketsReceiver):

View File

@ -1,4 +1,5 @@
from __future__ import annotations
import typing
if typing.TYPE_CHECKING:

View File

@ -3,15 +3,12 @@ from __future__ import annotations
import logging
import typing
from librespot.audio import GeneralAudioStream
from librespot.audio import HaltListener
from librespot.audio import NormalizationData
from librespot.audio import GeneralAudioStream, HaltListener, NormalizationData
from librespot.audio.cdn import CdnFeedHelper
from librespot.audio.format import AudioQualityPicker
from librespot.common.Utils import Utils
from librespot.core import Session
from librespot.metadata import PlayableId
from librespot.metadata import TrackId
from librespot.metadata import PlayableId, TrackId
from librespot.proto import Metadata_pb2 as Metadata
from librespot.proto import StorageResolve_pb2 as StorageResolve

View File

@ -1,8 +1,4 @@
from librespot.audio import AbsChunkedInputStream
from librespot.audio import AudioKeyManager
from librespot.audio import GeneralAudioStream
from librespot.audio import GeneralWritableStream
from librespot.audio import HaltListener
from librespot.audio import NormalizationData
from librespot.audio import PlayableContentFeeder
from librespot.audio import StreamId
from librespot.audio import (AbsChunkedInputStream, AudioKeyManager,
GeneralAudioStream, GeneralWritableStream,
HaltListener, NormalizationData,
PlayableContentFeeder, StreamId)

View File

@ -5,9 +5,8 @@ import random
import time
import typing
from librespot.audio import HaltListener
from librespot.audio import NormalizationData
from librespot.audio import PlayableContentFeeder
from librespot.audio import (HaltListener, NormalizationData,
PlayableContentFeeder)
from librespot.common import Utils
from librespot.core import Session
from librespot.proto import Metadata_pb2 as Metadata

View File

@ -8,12 +8,9 @@ import time
import typing
import urllib.parse
from librespot.audio import GeneralAudioStream
from librespot.audio import GeneralWritableStream
from librespot.audio import StreamId
from librespot.audio import GeneralAudioStream, GeneralWritableStream, StreamId
from librespot.audio.AbsChunkedInputStream import AbsChunkedInputStream
from librespot.audio.decrypt import AesAudioDecrypt
from librespot.audio.decrypt import NoopAudioDecrypt
from librespot.audio.decrypt import AesAudioDecrypt, NoopAudioDecrypt
from librespot.audio.format import SuperAudioFormat
from librespot.audio.storage import ChannelManager
from librespot.common import Utils

View File

@ -1,6 +1,7 @@
from librespot.proto import Metadata_pb2 as Metadata
import enum
from librespot.proto import Metadata_pb2 as Metadata
class SuperAudioFormat(enum.Enum):
MP3 = 0x00

View File

@ -8,13 +8,10 @@ import typing
from librespot.audio.storage import AudioFile
from librespot.common import Utils
from librespot.core import PacketsReceiver
from librespot.core import Session
from librespot.core import PacketsReceiver, Session
from librespot.crypto import Packet
from librespot.standard import BytesInputStream
from librespot.standard import BytesOutputStream
from librespot.standard import Closeable
from librespot.standard import Runnable
from librespot.standard import (BytesInputStream, BytesOutputStream, Closeable,
Runnable)
class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):

View File

@ -13,35 +13,25 @@ import typing
import defusedxml.ElementTree
import requests
from Crypto.Hash import HMAC
from Crypto.Hash import SHA1
from Crypto.Hash import HMAC, SHA1
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from librespot.audio import AudioKeyManager
from librespot.audio import PlayableContentFeeder
from librespot.audio import AudioKeyManager, PlayableContentFeeder
from librespot.audio.cdn import CdnManager
from librespot.audio.storage import ChannelManager
from librespot.cache import CacheManager
from librespot.common.Utils import Utils
from librespot.core import ApResolver
from librespot.core import EventService
from librespot.core import SearchManager
from librespot.core import TokenProvider
from librespot.crypto import CipherPair
from librespot.crypto import DiffieHellman
from librespot.crypto import Packet
from librespot.dealer import ApiClient
from librespot.dealer import DealerClient
from librespot.mercury import MercuryClient
from librespot.mercury import SubListener
from librespot.core import (ApResolver, EventService, SearchManager,
TokenProvider)
from librespot.crypto import CipherPair, DiffieHellman, Packet
from librespot.dealer import ApiClient, DealerClient
from librespot.mercury import MercuryClient, SubListener
from librespot.proto import Authentication_pb2 as Authentication
from librespot.proto import Connect_pb2 as Connect
from librespot.proto import Keyexchange_pb2 as Keyexchange
from librespot.proto.ExplicitContentPubsub_pb2 import UserAttributesUpdate
from librespot.standard import BytesInputStream
from librespot.standard import Closeable
from librespot.standard import Proxy
from librespot.standard import BytesInputStream, Closeable, Proxy
from librespot.Version import Version

View File

@ -4,11 +4,7 @@ import typing
import requests
from librespot.core.ApResolver import ApResolver
from librespot.metadata import AlbumId
from librespot.metadata import ArtistId
from librespot.metadata import EpisodeId
from librespot.metadata import ShowId
from librespot.metadata import TrackId
from librespot.metadata import AlbumId, ArtistId, EpisodeId, ShowId, TrackId
from librespot.proto import Connect_pb2 as Connect
from librespot.proto import Metadata_pb2 as Metadata
from librespot.standard import Closeable

View File

@ -7,17 +7,13 @@ import threading
import typing
from librespot.common import Utils
from librespot.core import PacketsReceiver
from librespot.core import Session
from librespot.core import PacketsReceiver, Session
from librespot.crypto import Packet
from librespot.mercury import JsonMercuryRequest
from librespot.mercury import RawMercuryRequest
from librespot.mercury import SubListener
from librespot.mercury import (JsonMercuryRequest, RawMercuryRequest,
SubListener)
from librespot.proto import Mercury_pb2 as Mercury
from librespot.proto import Pubsub_pb2 as Pubsub
from librespot.standard import BytesInputStream
from librespot.standard import BytesOutputStream
from librespot.standard import Closeable
from librespot.standard import BytesInputStream, BytesOutputStream, Closeable
class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):

View File

@ -2,8 +2,7 @@ from __future__ import annotations
import re
from librespot.common import Base62
from librespot.common import Utils
from librespot.common import Base62, Utils
from librespot.proto.ContextTrack_pb2 import ContextTrack

View File

@ -4,14 +4,11 @@ import typing
from librespot.core import Session
from librespot.dealer import DealerClient
from librespot.player import Player
from librespot.player import PlayerConfiguration
from librespot.player import Player, PlayerConfiguration
from librespot.player.state import DeviceStateHandler
from librespot.proto import Connect_pb2 as Connect
from librespot.proto.Player_pb2 import ContextPlayerOptions
from librespot.proto.Player_pb2 import PlayerState
from librespot.proto.Player_pb2 import Restrictions
from librespot.proto.Player_pb2 import Suppressions
from librespot.proto.Player_pb2 import (ContextPlayerOptions, PlayerState,
Restrictions, Suppressions)
class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):

View File

@ -1 +1,2 @@
from librespot.player.codecs.VorbisOnlyAudioQuality import VorbisOnlyAudioQuality
from librespot.player.codecs.VorbisOnlyAudioQuality import \
VorbisOnlyAudioQuality

View File

@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: authentication.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import enum_type_wrapper
# @@protoc_insertion_point(imports)

View File

@ -2,12 +2,13 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: connect.proto
"""Generated protocol buffer code."""
import librespot.proto.Player_pb2 as player__pb2
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import enum_type_wrapper
import librespot.proto.Player_pb2 as player__pb2
# @@protoc_insertion_point(imports)

View File

@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: keyexchange.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import enum_type_wrapper
# @@protoc_insertion_point(imports)

View File

@ -7,24 +7,20 @@ from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import enum_type_wrapper
from spotify.login5.v3 import (
client_info_pb2 as spotify_dot_login5_dot_v3_dot_client__info__pb2,
)
from spotify.login5.v3 import (
user_info_pb2 as spotify_dot_login5_dot_v3_dot_user__info__pb2,
)
from spotify.login5.v3.challenges import (
code_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2,
)
from spotify.login5.v3.challenges import (
hashcash_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2,
)
from spotify.login5.v3.credentials import (
credentials_pb2 as spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2,
)
from spotify.login5.v3.identifiers import (
identifiers_pb2 as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2,
)
from spotify.login5.v3 import \
client_info_pb2 as spotify_dot_login5_dot_v3_dot_client__info__pb2
from spotify.login5.v3 import \
user_info_pb2 as spotify_dot_login5_dot_v3_dot_user__info__pb2
from spotify.login5.v3.challenges import \
code_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2
from spotify.login5.v3.challenges import \
hashcash_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2
from spotify.login5.v3.credentials import \
credentials_pb2 as \
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2
from spotify.login5.v3.identifiers import \
identifiers_pb2 as \
spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2
# @@protoc_insertion_point(imports)

View File

@ -3,7 +3,8 @@
# source: spotify/login5/v3/challenges/hashcash.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
from google.protobuf import \
duration_pb2 as google_dot_protobuf_dot_duration__pb2
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database