Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Prettier if statement

Leo Torres834063a1fc7e
diff --git a/manim/__main__.py b/manim/__main__.py
index 9a5e7862f..ac4443ed8 100644
--- a/manim/__main__.py
+++ b/manim/__main__.py
@@ -61,13 +61,12 @@ def open_file_if_needed(file_writer):
def is_child_scene(obj, module):
- if not inspect.isclass(obj):
- return False
- if not issubclass(obj, Scene):
- return False
- if obj == Scene:
- return False
- if not obj.__module__.startswith(module.__name__):
+ if (
+ not inspect.isclass(obj)
+ or not issubclass(obj, Scene)
+ or obj == Scene
+ or not obj.__module__.startswith(module.__name__)
+ ):
return False
return True