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

micro ops #5186

Merged
merged 4 commits into from
Oct 28, 2024
Merged

micro ops #5186

merged 4 commits into from
Oct 28, 2024

Conversation

willmcgugan
Copy link
Collaborator

@willmcgugan willmcgugan commented Oct 28, 2024

I few micro-optimizations for layout.

These do reduce readability, but this is critical code in vertical layouts.

This could be done to the horizontal layouts -- but it does tend to be the vertical layouts which have a tonne of widgets.

  • Replace max() with equivalent ternary operator, sometimes with a walrus operator
  • Replaced a few int(fraction) with fraction.__init__()
  • Pulled Fraction in to local scope

@willmcgugan willmcgugan merged commit dabb773 into main Oct 28, 2024
9 of 19 checks passed
@willmcgugan willmcgugan deleted the layout-micro-ops branch October 28, 2024 14:06
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.

2 participants