From 6b49472723e2250bfd6db996e5a0442d89922b60 Mon Sep 17 00:00:00 2001 From: Gleb Liutsko Date: Wed, 27 Jan 2021 20:31:15 +0400 Subject: [PATCH] =?UTF-8?q?Fix=20=D1=82=D0=B0=D0=B9=D0=BF=D1=85=D0=B8?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=20(#355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yandex_music/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yandex_music/client.py b/yandex_music/client.py index 56150a1..f116f8d 100644 --- a/yandex_music/client.py +++ b/yandex_music/client.py @@ -1,7 +1,7 @@ import functools import logging from datetime import datetime -from typing import Callable, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Union from yandex_music import Album, Artist, ArtistAlbums, ArtistTracks, BriefInfo, Dashboard, DownloadInfo, Experiments, \ Feed, Genre, Landing, Like, PermissionAlerts, Playlist, PromoCodeStatus, Search, Settings, ShotEvent, Supplement, \ @@ -11,6 +11,9 @@ from yandex_music.exceptions import Captcha, InvalidToken from yandex_music.utils.difference import Difference from yandex_music.utils.request import Request +if TYPE_CHECKING: + from yandex_music.utils.captcha_response import CaptchaResponse + CLIENT_ID = '23cabbbdc6cd418abb4b39c32c41195d' CLIENT_SECRET = '53bc75238f0c4d08a118e51fe9203300' @@ -119,7 +122,7 @@ class Client(YandexMusicObject): @classmethod def from_credentials(cls, username: str, password: str, x_captcha_answer: str = None, x_captcha_key: str = None, - captcha_callback: Callable[[Captcha], str] = None, *args, **kwargs) -> 'Client': + captcha_callback: Callable[['CaptchaResponse'], str] = None, *args, **kwargs) -> 'Client': """Инициализция клиента по логину и паролю. Note: