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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fix Rich formatting with no commands #796

Merged
merged 5 commits into from Apr 9, 2024

Conversation

svlandeg
Copy link
Collaborator

@svlandeg svlandeg commented Apr 9, 2024

When taking the max of the list of commands, define a default value to guard against calling max on an empty list, which would raise an error. (this is also how I had it in the original suggestion)

Fixes PrefectHQ/prefect#12617
Fixes #795

@svlandeg svlandeg added bug Something isn't working p2 labels Apr 9, 2024
@svlandeg svlandeg changed the title Add default when taking max 馃悰 Fix Rich formatting with an empty list Apr 9, 2024
Copy link
Collaborator Author

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

Unit test taken from #795 馃檹

@svlandeg svlandeg changed the title 馃悰 Fix Rich formatting with an empty list 馃悰 Fix Rich formatting with no commands Apr 9, 2024
@mattkram
Copy link

mattkram commented Apr 9, 2024

Thanks for the implementation @svlandeg! Beat me to the chase!

@tiangolo tiangolo merged commit 3bc7d25 into tiangolo:master Apr 9, 2024
15 checks passed
@tiangolo
Copy link
Owner

tiangolo commented Apr 9, 2024

Nice, thank you! @svlandeg 馃嵃

Sorry I didn't realize we needed the default you had originally suggested. 馃槵

This will be available in the next minutes in Typer 0.12.3. 馃殌

@svlandeg svlandeg deleted the bugfix/max_default branch April 9, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typer 0.12.2 breaks test suite
3 participants