From cda304fef0111d2eb7926f192ea4f9ed4ad831b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 20:54:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- manim_slides/manim.py | 11 ++++++++--- manim_slides/present.py | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/manim_slides/manim.py b/manim_slides/manim.py index 5fc756e..97fa217 100644 --- a/manim_slides/manim.py +++ b/manim_slides/manim.py @@ -1,5 +1,5 @@ -from importlib.util import find_spec import sys +from importlib.util import find_spec MANIM_PACKAGE_NAME = "manim" MANIM_AVAILABLE = find_spec(MANIM_PACKAGE_NAME) is not None @@ -11,7 +11,10 @@ MANIMGL_IMPORTED = MANIMGL_PACKAGE_NAME in sys.modules if MANIM_IMPORTED and MANIMGL_IMPORTED: from manim import logger - logger.warn("Both manim and manimgl are installed, therefore `manim-slide` needs to need which one to use. Please only import one of the two modules so that `manim-slide` knows which one to use. Here, manim is used by default") + + logger.warn( + "Both manim and manimgl are installed, therefore `manim-slide` needs to need which one to use. Please only import one of the two modules so that `manim-slide` knows which one to use. Here, manim is used by default" + ) MANIM = True MANIMGL = False elif MANIM_AVAILABLE and not MANIMGL_IMPORTED: @@ -21,7 +24,9 @@ elif MANIMGL_AVAILABLE: MANIM = False MANIMGL = True else: - raise ImportError("Either manim (community) or manimgl (3b1b) package must be installed") + raise ImportError( + "Either manim (community) or manimgl (3b1b) package must be installed" + ) FFMPEG_BIN = None diff --git a/manim_slides/present.py b/manim_slides/present.py index 1aaeedb..fc2bd2e 100644 --- a/manim_slides/present.py +++ b/manim_slides/present.py @@ -377,12 +377,16 @@ def present(scenes, config_path, folder, start_paused, fullscreen, last_frame_ne indices = list(map(int, value.strip().replace(" ", "").split(","))) if not all(map(lambda i: 0 < i <= len(scene_choices), indices)): - raise click.UsageError("Please only enter numbers displayed on the screen.") + raise click.UsageError( + "Please only enter numbers displayed on the screen." + ) return [scene_choices[i] for i in indices] if len(scene_choices) == 0: - raise click.UsageError("No scenes were found, are you in the correct directory?") + raise click.UsageError( + "No scenes were found, are you in the correct directory?" + ) while True: try: