From 083af60c6fdd6c17d4ed228233e36cd5fa07a45f Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Tue, 1 Mar 2022 21:11:50 +0000 Subject: [PATCH] sorted imports using isort --- video2x/__init__.py | 5 ++--- video2x/__main__.py | 5 +---- video2x/decoder.py | 13 +++++-------- video2x/pipe_printer.py | 3 +-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/video2x/__init__.py b/video2x/__init__.py index 5ea3b46..91c9458 100755 --- a/video2x/__init__.py +++ b/video2x/__init__.py @@ -26,7 +26,6 @@ Last Modified: February 16, 2022 # prevent setup.cfg from producing import errors __version__ = "5.0.0-beta5" -# local imports -from .video2x import Video2X -from .upscaler import Upscaler from .interpolator import Interpolator +from .upscaler import Upscaler +from .video2x import Video2X diff --git a/video2x/__main__.py b/video2x/__main__.py index d93968f..51bfcb3 100755 --- a/video2x/__main__.py +++ b/video2x/__main__.py @@ -22,12 +22,9 @@ Date Created: July 3, 2021 Last Modified: February 26, 2022 """ -# local imports -from .video2x import main - -# built-in imports import sys +from .video2x import main if __name__ == "__main__": sys.exit(main()) diff --git a/video2x/decoder.py b/video2x/decoder.py index 61167ba..539b688 100755 --- a/video2x/decoder.py +++ b/video2x/decoder.py @@ -19,14 +19,11 @@ along with this program. If not, see . Name: Video Decoder Author: K4YT3X Date Created: June 17, 2021 -Last Modified: February 28, 2022 +Last Modified: March 1, 2022 """ -# local imports -from .pipe_printer import PipePrinter - -# built-in imports import contextlib +import multiprocessing import os import pathlib import queue @@ -34,11 +31,11 @@ import signal import subprocess import threading -# third-party imports +import ffmpeg from loguru import logger from PIL import Image -import ffmpeg +from .pipe_printer import PipePrinter # map Loguru log levels to FFmpeg log levels LOGURU_FFMPEG_LOGLEVELS = { @@ -59,7 +56,7 @@ class VideoDecoder(threading.Thread): input_width: int, input_height: int, frame_rate: float, - processing_queue: queue.Queue, + processing_queue: multiprocessing.Queue, processing_settings: tuple, ignore_max_image_pixels=True, ) -> None: diff --git a/video2x/pipe_printer.py b/video2x/pipe_printer.py index f1e5f53..e03a180 100755 --- a/video2x/pipe_printer.py +++ b/video2x/pipe_printer.py @@ -22,12 +22,11 @@ Date Created: February 27, 2022 Last Modified: February 28, 2022 """ -# built-in imports -from typing import IO import os import sys import threading import time +from typing import IO class PipePrinter(threading.Thread):