Video editing with Python
Fix formatting.
vermont858584deaeba
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..63857296 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 Realdiff --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 1e861884..a3be4cb5 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@@ -444,7 +445,8 @@ class FFmpegInfosParser:"stream_number": stream_number,"stream_type": stream_type_lower,"language": language,- "default": (stream_type_lower not in self._default_streams) and line.endswith("(default)"),+ "default": (stream_type_lower not in self._default_streams)+ and line.endswith("(default)"),}# for default streams, set their numbers globally, so it's@@ -475,9 +477,7 @@ class FFmpegInfosParser:# parse relevant data by stream typetry:- stream_data = self.parse_data_by_stream_type(- stream_type, line- )+ stream_data = self.parse_data_by_stream_type(stream_type, line)except NotImplementedError as exc:warnings.warn(f"{str(exc)}\nffmpeg output:\n\n{self.infos}", UserWarning@@ -563,8 +563,12 @@ class FFmpegInfosParser:# set some global info based on the defaultsfor stream_type_lower, stream_data in self._default_streams.items():- self.result[f"default_{stream_type_lower}_input_number"] = stream_data["input_number"]- self.result[f"default_{stream_type_lower}_stream_number"] = stream_data["stream_number"]+ self.result[f"default_{stream_type_lower}_input_number"] = stream_data[+ "input_number"+ ]+ self.result[f"default_{stream_type_lower}_stream_number"] = stream_data[+ "stream_number"+ ]if stream_type_lower == "audio":self.result["audio_found"] = Truediff --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