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

Better early return for add_launch_buttons if no launch buttons #693

Merged

Conversation

paugier
Copy link
Contributor

@paugier paugier commented Feb 25, 2023

@choldgraf
Copy link
Member

Nice - this looks correct to me. Could you just add a test to make sure that if none if them are there, then there is no launch buttons dropdo container on the page?

not launch_buttons
or not _is_notebook(app, pagename)
or not any(
launch_buttons[key]
Copy link
Member

Choose a reason for hiding this comment

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

Shouldnt we use launch_buttons.get(key) in case one is not present so we don't raise a key error?

@choldgraf choldgraf merged commit 70e8ade into executablebooks:master Feb 26, 2023
@welcome
Copy link

welcome bot commented Feb 26, 2023

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

@choldgraf
Copy link
Member

actually, no worries I will add a test in #691 - many thanks for this improvement :-)

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

Successfully merging this pull request may close these issues.

Silence WARNING: Currently Binder/JupyterHub repositories must be on GitHub, got https://...
2 participants