mirror of https://github.com/devine-dl/devine.git
Re-order all imports across project with isort
This commit is contained in:
parent
faabfb550c
commit
d982e37ee5
|
@ -15,7 +15,7 @@ from functools import partial
|
|||
from http.cookiejar import MozillaCookieJar
|
||||
from pathlib import Path
|
||||
from threading import Event
|
||||
from typing import Any, Optional, Callable
|
||||
from typing import Any, Callable, Optional
|
||||
|
||||
import click
|
||||
import jsonpickle
|
||||
|
@ -27,18 +27,18 @@ from pywidevine.remotecdm import RemoteCdm
|
|||
from tqdm import tqdm
|
||||
|
||||
from devine.core.config import config
|
||||
from devine.core.constants import AnyTrack, context_settings, LOG_FORMATTER, DRM_SORT_MAP
|
||||
from devine.core.drm import Widevine, DRM_T
|
||||
from devine.core.proxies import Basic, NordVPN, Hola
|
||||
from devine.core.constants import DRM_SORT_MAP, LOG_FORMATTER, AnyTrack, context_settings
|
||||
from devine.core.credential import Credential
|
||||
from devine.core.drm import DRM_T, Widevine
|
||||
from devine.core.proxies import Basic, Hola, NordVPN
|
||||
from devine.core.service import Service
|
||||
from devine.core.services import Services
|
||||
from devine.core.titles import Title_T, Movie, Song
|
||||
from devine.core.titles import Movie, Song, Title_T
|
||||
from devine.core.titles.episode import Episode
|
||||
from devine.core.tracks import Audio, Video
|
||||
from devine.core.utilities import is_close_match, get_binary_path
|
||||
from devine.core.utilities import get_binary_path, is_close_match
|
||||
from devine.core.utils.click_types import LANGUAGE_RANGE, QUALITY, SEASON_RANGE, ContextData
|
||||
from devine.core.utils.collections import merge_dict
|
||||
from devine.core.credential import Credential
|
||||
from devine.core.utils.subprocess import ffprobe
|
||||
from devine.core.vaults import Vaults
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ from typing import Optional
|
|||
|
||||
import click
|
||||
|
||||
from devine.core.vault import Vault
|
||||
from devine.core.config import config
|
||||
from devine.core.constants import context_settings
|
||||
from devine.core.services import Services
|
||||
from devine.core.vault import Vault
|
||||
from devine.core.vaults import Vaults
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import coloredlogs
|
|||
|
||||
from devine.core import __version__
|
||||
from devine.core.commands import Commands
|
||||
from devine.core.constants import context_settings, LOG_FORMAT
|
||||
from devine.core.constants import LOG_FORMAT, context_settings
|
||||
|
||||
|
||||
@click.command(cls=Commands, invoke_without_command=True, context_settings=context_settings)
|
||||
|
|
|
@ -4,14 +4,13 @@ import zlib
|
|||
from datetime import datetime, timedelta
|
||||
from os import stat_result
|
||||
from pathlib import Path
|
||||
from typing import Optional, Any, Union
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
import jsonpickle
|
||||
import jwt
|
||||
|
||||
from devine.core.config import config
|
||||
|
||||
|
||||
EXP_T = Union[datetime, str, int, float]
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import logging
|
||||
from typing import TypeVar, Union
|
||||
|
||||
|
||||
LOG_FORMAT = "{asctime} [{levelname[0]}] {name} : {message}" # must be '{}' style
|
||||
LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||
LOG_FORMATTER = logging.Formatter(LOG_FORMAT, LOG_DATE_FORMAT, "{")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import asyncio
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import Union, Optional
|
||||
from typing import Optional, Union
|
||||
|
||||
from devine.core.config import config
|
||||
from devine.core.utilities import get_binary_path, start_pproxy
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import Union, Optional
|
||||
from typing import Optional, Union
|
||||
|
||||
from devine.core.utilities import get_binary_path
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import re
|
||||
from hashlib import md5
|
||||
from typing import Union, Any, Optional
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
import m3u8
|
||||
import requests
|
||||
|
@ -12,8 +12,8 @@ from pywidevine.cdm import Cdm as WidevineCdm
|
|||
from pywidevine.pssh import PSSH
|
||||
from requests import Session
|
||||
|
||||
from devine.core.drm import ClearKey, Widevine, DRM_T
|
||||
from devine.core.tracks import Tracks, Video, Audio, Subtitle
|
||||
from devine.core.drm import DRM_T, ClearKey, Widevine
|
||||
from devine.core.tracks import Audio, Subtitle, Tracks, Video
|
||||
from devine.core.utilities import is_close_match
|
||||
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@ from __future__ import annotations
|
|||
import base64
|
||||
import logging
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from http.cookiejar import MozillaCookieJar, CookieJar
|
||||
from http.cookiejar import CookieJar, MozillaCookieJar
|
||||
from typing import Optional, Union
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import click
|
||||
import requests
|
||||
from requests.adapters import Retry, HTTPAdapter
|
||||
from requests.adapters import HTTPAdapter, Retry
|
||||
|
||||
from devine.core.cacher import Cacher
|
||||
from devine.core.config import config
|
||||
from devine.core.constants import AnyTrack
|
||||
from devine.core.titles import Titles_T, Title_T
|
||||
from devine.core.credential import Credential
|
||||
from devine.core.titles import Title_T, Titles_T
|
||||
from devine.core.tracks import Chapter, Tracks
|
||||
from devine.core.utilities import get_ip_info
|
||||
from devine.core.cacher import Cacher
|
||||
from devine.core.credential import Credential
|
||||
|
||||
|
||||
class Service(metaclass=ABCMeta):
|
||||
|
|
|
@ -2,8 +2,7 @@ from typing import Union
|
|||
|
||||
from .episode import Episode, Series
|
||||
from .movie import Movie, Movies
|
||||
from .song import Song, Album
|
||||
|
||||
from .song import Album, Song
|
||||
|
||||
Title_T = Union[Movie, Episode, Song]
|
||||
Titles_T = Union[Movies, Series, Album]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
from abc import ABC
|
||||
from collections import Counter
|
||||
from typing import Any, Optional, Union, Iterable
|
||||
from typing import Any, Iterable, Optional, Union
|
||||
|
||||
from langcodes import Language
|
||||
from pymediainfo import MediaInfo
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from abc import ABC
|
||||
from typing import Any, Optional, Union, Iterable
|
||||
from typing import Any, Iterable, Optional, Union
|
||||
|
||||
from langcodes import Language
|
||||
from pymediainfo import MediaInfo
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from abc import ABC
|
||||
from typing import Any, Optional, Union, Iterable
|
||||
from typing import Any, Iterable, Optional, Union
|
||||
|
||||
from langcodes import Language
|
||||
from pymediainfo import MediaInfo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Optional, Union, Any
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from langcodes import Language
|
||||
from pymediainfo import MediaInfo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from .audio import Audio
|
||||
from .track import Track
|
||||
from .chapter import Chapter
|
||||
from .subtitle import Subtitle
|
||||
from .track import Track
|
||||
from .tracks import Tracks
|
||||
from .video import Video
|
||||
|
|
|
@ -11,11 +11,11 @@ from langcodes import Language, closest_supported_match
|
|||
from devine.core.config import config
|
||||
from devine.core.constants import LANGUAGE_MAX_DISTANCE, LANGUAGE_MUX_MAP, AnyTrack, TrackT
|
||||
from devine.core.tracks.audio import Audio
|
||||
from devine.core.tracks.track import Track
|
||||
from devine.core.tracks.chapter import Chapter
|
||||
from devine.core.tracks.subtitle import Subtitle
|
||||
from devine.core.tracks.track import Track
|
||||
from devine.core.tracks.video import Video
|
||||
from devine.core.utilities import sanitize_filename, is_close_match
|
||||
from devine.core.utilities import is_close_match, sanitize_filename
|
||||
from devine.core.utils.collections import as_list, flatten
|
||||
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ from typing import Any, Optional, Union
|
|||
from langcodes import Language
|
||||
|
||||
from devine.core.config import config
|
||||
from devine.core.tracks.track import Track
|
||||
from devine.core.tracks.subtitle import Subtitle
|
||||
from devine.core.utilities import get_binary_path, get_boxes, FPS
|
||||
from devine.core.tracks.track import Track
|
||||
from devine.core.utilities import FPS, get_binary_path, get_boxes
|
||||
|
||||
|
||||
class Video(Track):
|
||||
|
|
|
@ -4,15 +4,14 @@ import importlib.util
|
|||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import unicodedata
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
from typing import AsyncIterator, Optional, Sequence, Union
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import pproxy
|
||||
import requests
|
||||
import unicodedata
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
from typing import Optional, Union, Sequence, AsyncIterator
|
||||
|
||||
from langcodes import Language, closest_match
|
||||
from pymp4.parser import Box
|
||||
from unidecode import unidecode
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Iterator, Optional, Union, Any
|
||||
from typing import Any, Iterator, Optional, Union
|
||||
from uuid import UUID
|
||||
|
||||
from devine.core.vault import Vault
|
||||
from devine.core.config import config
|
||||
from devine.core.utilities import import_module_by_path
|
||||
from devine.core.vault import Vault
|
||||
|
||||
_VAULTS = sorted(
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue