Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Google Collab Embedding issue #3943

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CapNCrunchy
Copy link

Changelog

Updated the older embedmedia from default "None" to "False"

Summary of Changes

Checklist

  • [-] I have read the Contributing Guidelines
  • [-] I have written a descriptive PR title (see top of PR template for examples)
  • [-] I have added a test case to prevent software regression

Reviewer Checklist

  • The PR title is descriptive enough
  • The PR is labeled appropriately
  • Regression test(s) are implemented

Copy link
Contributor

@chopan050 chopan050 left a comment

Choose a reason for hiding this comment

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

Thanks for your PR! I left a very minor change request.

@@ -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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants