Skip to content

Commit f88d64a

Browse files
Fixed flake C417 and improved a comment (#2751)
* fixed flake c417 and improved a comment * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a7ad01d commit f88d64a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

manim/utils/ipython_magic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ def construct(self):
131131
if config.renderer == "opengl":
132132
# Check if the imported mobjects extend the OpenGLMobject class
133133
# meaning ConvertToOpenGL did its job
134-
if "OpenGLMobject" in map(lambda cls: cls.__name__, Group.mro()):
134+
if "OpenGLMobject" in [
135+
parent_class.__name__ for parent_class in Group.mro()
136+
]:
135137
from manim.renderer.opengl_renderer import OpenGLRenderer
136138

137139
renderer = OpenGLRenderer()

manim/utils/testing/frames_comparison.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ def wrapper(*args, request: FixtureRequest, tmp_path, **kwargs):
8989
construct = functools.partial(tested_scene_construct, *args, **kwargs)
9090

9191
# Kwargs contains the eventual parametrization arguments.
92-
# This modify the test_name so the it is defined by the parametrization arguments too.
93-
# Ex : if "length" is parametrized from 0 to 20, the kwargs will be with once with {"length" : 1}, etc.
92+
# This modifies the test_name so that it is defined by the parametrization
93+
# arguments too.
94+
# Example: if "length" is parametrized from 0 to 20, the kwargs
95+
# will be once with {"length" : 1}, etc.
9496
test_name_with_param = test_name + "_".join(
95-
map(lambda tup: f"{str(tup[0])}:{str(tup[1])}", kwargs.items()),
97+
[f"{str(tup[0])}:{str(tup[1])}" for tup in kwargs.items()],
9698
)
9799

98100
config_tests = _config_test(last_frame)

0 commit comments

Comments
 (0)