Skip to content
Snippets Groups Projects

BIG flow3r

Merged rahix requested to merge rahix/big-flow3r into main

Add big-flow3r support to the simulator via --full-screen flag.

PXL_20230818_211658951.jpg

What it looks like on the screen:

image

TODO:

Edited by rahix

Merge request reports

Pipeline #12776 passed

Pipeline passed for f4a570cc on rahix/big-flow3r

Approval is optional

Merged by dxdx 11 months ago (Apr 12, 2024 10:44am UTC)

Merge details

  • Changes merged into main with 284311ae.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #12777 passed

Pipeline passed for 284311ae on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
171 171 NumberTunable is a UnaryTunable that has a numeric value
172 172 """
173 173
174 def __init__(self, name: str, key: str, default: Optional[int | float]) -> None:
174 def __init__(self, name: str, key: str, default: Optional[float]) -> None:
  • Comment on lines -174 to +174
    Maintainer

    What's this change about? It doesn't seem right.

  • Author Owner

    Optional[int | float] is not a valid type annotation. I've changed it to just float because an int should be viewed as a subclass of float for typing purposes. But even if you wanted to express the union, the correct syntax would have been Optional[Union[int, float]], or the equivalent Union[int, float, None].

    The only reason I touched this code at all is that the regular python interpreter throws an exception when trying to evaluate this annotation as part of running the simulator.

  • Maintainer

    Optional[int | float] is a valid type annotation and the simulator works fine with it (otherwise CI would be broken on main right now). Union type expressions were introduced with Python 3.10 in 2021 (PEP 604). If you want to make it compatible with Python < 3.10 then go on, though it may be worth editing the commit message to be less confusing.

    So https://peps.python.org/pep-0484/#the-numeric-tower states that float alone will, indeed, already cover int. Personally I'd prefer having it explicit, but my initial worry was that it's wrong - and it's not 🤪️

  • Please register or sign in to reply
  • dx added 18 commits

    added 18 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading