Skip to content

Video editing with Python

fix typing in python 3.9

osaajani2cbf5394a38c
diff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.py
index 7fe55658..280af56c 100644
--- a/moviepy/video/VideoClip.py
+++ b/moviepy/video/VideoClip.py
@@ -1932,7 +1932,9 @@ class TextClip(ImageClip):
def __multiline_spacing(
self,
draw: ImageDraw.ImageDraw,
- font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont,
+ font: Union[
+ ImageFont.ImageFont, ImageFont.FreeTypeFont, ImageFont.TransposedFont
+ ],
spacing: float,
stroke_width: float,
) -> float: