Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manim/utils/ipython_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def construct(self):

file_type = mimetypes.guess_type(config["output_file"])[0]
embed = config["media_embed"]
if embed is None:
if embed is False:
Copy link
Contributor

@chopan050 chopan050 Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this?

Suggested change
if embed is False:
if not embed:

It's more Pythonic. According to PEP8:

Don’t compare boolean values to True or False using ==:

# Correct:
if greeting:

# Wrong:
if greeting == True:

Worse:

# Wrong:
if greeting is True:

# videos need to be embedded when running in google colab.
# do this automatically in case config.media_embed has not been
# set explicitly.
Expand Down
Loading