Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fixed flake C417 and improved a comment (#2751)

Benjamin Hacklf88d64a821ba
diff --git a/manim/utils/ipython_magic.py b/manim/utils/ipython_magic.py
index 61caf706b..f41a3fb13 100644
--- a/manim/utils/ipython_magic.py
+++ b/manim/utils/ipython_magic.py
@@ -131,7 +131,9 @@ else:
if config.renderer == "opengl":
# Check if the imported mobjects extend the OpenGLMobject class
# meaning ConvertToOpenGL did its job
- if "OpenGLMobject" in map(lambda cls: cls.__name__, Group.mro()):
+ if "OpenGLMobject" in [
+ parent_class.__name__ for parent_class in Group.mro()
+ ]:
from manim.renderer.opengl_renderer import OpenGLRenderer
renderer = OpenGLRenderer()
diff --git a/manim/utils/testing/frames_comparison.py b/manim/utils/testing/frames_comparison.py
index e839145e2..05a771f5e 100644
--- a/manim/utils/testing/frames_comparison.py
+++ b/manim/utils/testing/frames_comparison.py
@@ -89,10 +89,12 @@ def frames_comparison(
construct = functools.partial(tested_scene_construct, *args, **kwargs)
# Kwargs contains the eventual parametrization arguments.
- # This modify the test_name so the it is defined by the parametrization arguments too.
- # Ex : if "length" is parametrized from 0 to 20, the kwargs will be with once with {"length" : 1}, etc.
+ # This modifies the test_name so that it is defined by the parametrization
+ # arguments too.
+ # Example: if "length" is parametrized from 0 to 20, the kwargs
+ # will be once with {"length" : 1}, etc.
test_name_with_param = test_name + "_".join(
- map(lambda tup: f"{str(tup[0])}:{str(tup[1])}", kwargs.items()),
+ [f"{str(tup[0])}:{str(tup[1])}" for tup in kwargs.items()],
)
config_tests = _config_test(last_frame)