Skip to content

Video editing with Python

Fix formatting.

vermont858584deaeba
diff --git a/examples/soundtrack.py b/examples/soundtrack.py
index 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.py
index 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 that
are common to the two subclasses of Clip, VideoClip and AudioClip.
"""
+
import copy as _copy
from functools import reduce
from numbers import Real
diff --git a/moviepy/audio/fx/all/__init__.py b/moviepy/audio/fx/all/__init__.py
index 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 warnings
from .. import * # noqa 401,F403
diff --git a/moviepy/decorators.py b/moviepy/decorators.py
index 621e3585..e080ab3d 100644
--- a/moviepy/decorators.py
+++ b/moviepy/decorators.py
@@ -1,4 +1,5 @@
"""Decorators used by moviepy."""
+
import inspect
import os
diff --git a/moviepy/tools.py b/moviepy/tools.py
index 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 os
import subprocess as sp
import warnings
diff --git a/moviepy/video/fx/all/__init__.py b/moviepy/video/fx/all/__init__.py
index 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 warnings
from moviepy.video.fx import * # noqa F401,F403
diff --git a/moviepy/video/io/ffmpeg_reader.py b/moviepy/video/io/ffmpeg_reader.py
index 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 os
import re
import 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 type
try:
- 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 defaults
for 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"] = True
diff --git a/moviepy/video/tools/credits.py b/moviepy/video/tools/credits.py
index 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 is
difficult to fill everyone needs in this matter.
"""
+
from moviepy.decorators import convert_path_to_string
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from moviepy.video.fx.resize import resize
diff --git a/tests/test_VideoFileClip.py b/tests/test_VideoFileClip.py
index 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 copy
import os