| Total Complexity | 1 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from typing import Tuple |
||
|
|
|||
| 2 | |||
| 3 | __all__: Tuple[str, ...] = ( |
||
| 4 | # Main class |
||
| 5 | "AsyncVKMusic", |
||
| 6 | # Auth class |
||
| 7 | "AsyncVKAuth", |
||
| 8 | # VK Music class exceptions |
||
| 9 | "InvalidQuery", |
||
| 10 | "InvalidPath", |
||
| 11 | "SearchSongError", |
||
| 12 | "ParserError", |
||
| 13 | "ParseLinkError", |
||
| 14 | "DownloaderRequestError", |
||
| 15 | "DownloaderWriteError", |
||
| 16 | # VK Auth class exceptions |
||
| 17 | "OAuthRequestError", |
||
| 18 | "VKIDRequestError", |
||
| 19 | "ConnectAuthRequestError", |
||
| 20 | "SendCodeRequestError", |
||
| 21 | "GetCookiesRequestError", |
||
| 22 | "AuthObjectNotFound", |
||
| 23 | "AuthParsingError", |
||
| 24 | "CookieWriterError" |
||
| 25 | ) |
||
| 26 | |||
| 27 | try: |
||
| 28 | from .async_auth import ( |
||
| 29 | AsyncVKAuth, |
||
| 30 | OAuthRequestError, |
||
| 31 | VKIDRequestError, |
||
| 32 | ConnectAuthRequestError, |
||
| 33 | SendCodeRequestError, |
||
| 34 | GetCookiesRequestError, |
||
| 35 | AuthObjectNotFound, |
||
| 36 | AuthParsingError, |
||
| 37 | CookieWriterError |
||
| 38 | ) |
||
| 39 | from .async_client import ( |
||
| 40 | AsyncVKMusic, |
||
| 41 | InvalidQuery, |
||
| 42 | InvalidPath, |
||
| 43 | SearchSongError, |
||
| 44 | ParserError, |
||
| 45 | ParseLinkError, |
||
| 46 | DownloaderRequestError, |
||
| 47 | DownloaderWriteError |
||
| 48 | ) |
||
| 49 | except ImportError: |
||
| 50 | |||
| 51 | def exit_init() -> None: |
||
| 52 | import sys |
||
| 53 | |||
| 54 | print( |
||
| 55 | "VKMusic could not run.\n" |
||
| 56 | "Looks like required dependencies were not installed.\n" |
||
| 57 | "Please make sure you have installed all required dependencies " |
||
| 58 | "from requirements.txt file correctly." |
||
| 59 | ) |
||
| 60 | sys.exit(1) |
||
| 61 | |||
| 62 | exit_init() |
||
| 63 |