Video editing with Python
style: fix code formatting (Black, flake8)
K Kollmannf5a6fde76271
diff --git a/examples/soundtrack.py b/examples/soundtrack.pyindex 48adbb99..c2efd8c0 100644--- a/examples/soundtrack.py+++ b/examples/soundtrack.py@@ -1,4 +1,5 @@"""A simple test script on how to put a soundtrack to a movie."""+from moviepy import *diff --git a/moviepy/Clip.py b/moviepy/Clip.pyindex 5c2d88b2..733b2e04 100644--- a/moviepy/Clip.py+++ b/moviepy/Clip.py@@ -1,6 +1,7 @@"""Implements the central object of MoviePy, the Clip, and all the methods thatare common to the two subclasses of Clip, VideoClip and AudioClip."""+import copy as _copyfrom functools import reducefrom numbers import Real@@ -635,8 +636,9 @@ class Clip:return self.get_frame(key)def __del__(self):- # WARNING: as stated in close() above, if we call close, it closes clips even- # if shallow copies are still in used, leading to some bugs: https://github.com/Zulko/moviepy/issues/1994+ # WARNING: as stated in close() above, if we call close, it closes clips+ # even if shallow copies are still in used, leading to some bugs, see:+ # https://github.com/Zulko/moviepy/issues/1994# so don't call self.close() here, rather do it manually in the code.passdiff --git a/moviepy/audio/fx/all/__init__.py b/moviepy/audio/fx/all/__init__.pyindex c6cadf1c..d51e6595 100644--- a/moviepy/audio/fx/all/__init__.py+++ b/moviepy/audio/fx/all/__init__.py@@ -4,6 +4,7 @@ moviepy.audio.fx.all is deprecated.Use the fx method directly from the clip instance (e.g. ``clip.audio_normalize(...)``)or import the function from moviepy.audio.fx instead."""+import warningsfrom .. import * # noqa 401,F403diff --git a/moviepy/decorators.py b/moviepy/decorators.pyindex 621e3585..e080ab3d 100644--- a/moviepy/decorators.py+++ b/moviepy/decorators.py@@ -1,4 +1,5 @@"""Decorators used by moviepy."""+import inspectimport osdiff --git a/moviepy/tools.py b/moviepy/tools.pyindex a260e75b..3dda375e 100644--- a/moviepy/tools.py+++ b/moviepy/tools.py@@ -1,4 +1,5 @@"""Misc. useful functions that can be used at many places in the program."""+import osimport subprocess as spimport warningsdiff --git a/moviepy/video/fx/all/__init__.py b/moviepy/video/fx/all/__init__.pyindex 34b0627d..0e4d6f2f 100644--- a/moviepy/video/fx/all/__init__.py+++ b/moviepy/video/fx/all/__init__.py@@ -4,6 +4,7 @@ moviepy.video.fx.all is deprecated.Use the fx method directly from the clip instance (e.g. ``clip.resize(...)``)or import the function from moviepy.video.fx instead."""+import warningsfrom moviepy.video.fx import * # noqa F401,F403diff --git a/moviepy/video/io/ffmpeg_reader.py b/moviepy/video/io/ffmpeg_reader.pyindex b7be9717..f871bd8f 100644--- a/moviepy/video/io/ffmpeg_reader.py+++ b/moviepy/video/io/ffmpeg_reader.py@@ -1,4 +1,5 @@"""Implements all the functions to read a video or a picture using ffmpeg."""+import osimport reimport subprocess as sp@@ -451,12 +452,12 @@ class FFmpegInfosParser:# for default streams, set their numbers globally, so it's# easy to get without iterating allif self._current_stream["default"]:- self.result[- f"default_{stream_type_lower}_input_number"- ] = input_number- self.result[- f"default_{stream_type_lower}_stream_number"- ] = stream_number+ self.result[f"default_{stream_type_lower}_input_number"] = (+ input_number+ )+ self.result[f"default_{stream_type_lower}_stream_number"] = (+ stream_number+ )# exit chapterif self._current_chapter:diff --git a/moviepy/video/tools/credits.py b/moviepy/video/tools/credits.pyindex f5b04025..a7bf9fb5 100644--- a/moviepy/video/tools/credits.py+++ b/moviepy/video/tools/credits.py@@ -1,6 +1,7 @@"""Contains different functions to make end and opening credits, even though it isdifficult to fill everyone needs in this matter."""+from moviepy.decorators import convert_path_to_stringfrom moviepy.video.compositing.CompositeVideoClip import CompositeVideoClipfrom moviepy.video.fx.resize import resizediff --git a/tests/test_VideoFileClip.py b/tests/test_VideoFileClip.pyindex e92f78e0..bd8f996e 100644--- a/tests/test_VideoFileClip.py+++ b/tests/test_VideoFileClip.py@@ -1,4 +1,5 @@"""Video file clip tests meant to be run with pytest."""+import copyimport os