Skip to content

feat: Improve rendering of tags and cases#2943

Merged
aborgna-q merged 1 commit intomainfrom
ab/py-render-improvements
Mar 13, 2026
Merged

feat: Improve rendering of tags and cases#2943
aborgna-q merged 1 commit intomainfrom
ab/py-render-improvements

Conversation

@aborgna-q
Copy link
Collaborator

Some minor changes to clean up the python rendering:

  • Add more special cases when rendering a Tag operation:

    • Bool tags are shown as False or True (We used Left and Some before)
    • Added a None case (It was shown as Left before)
  • Print the case number inside conditionals

  • drive-by: Add missing pytest-xdist dev dependency. It is used to pass -n auto to pytest in some just tasks.

@aborgna-q aborgna-q requested a review from a team as a code owner March 13, 2026 11:22
@aborgna-q aborgna-q requested a review from mark-koch March 13, 2026 11:22
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.81%. Comparing base (86b654b) to head (acddcfc).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2943   +/-   ##
=======================================
  Coverage   83.81%   83.81%           
=======================================
  Files         267      267           
  Lines       53053    53061    +8     
  Branches    46992    46992           
=======================================
+ Hits        44465    44473    +8     
  Misses       6318     6318           
  Partials     2270     2270           
Flag Coverage Δ
python 88.76% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aborgna-q aborgna-q added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 6ba9e45 Mar 13, 2026
29 checks passed
@aborgna-q aborgna-q deleted the ab/py-render-improvements branch March 13, 2026 17:35
github-merge-queue bot pushed a commit that referenced this pull request Mar 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.15.5](hugr-py-v0.15.4...hugr-py-v0.15.5)
(2026-03-16)


### Features

* Define pass application scopes
([#2772](#2772))
([847b864](847b864))
* deprecate Function (Value) in hugr-py too
([#2882](#2882))
([043fec2](043fec2))
* Improve rendering of tags and cases
([#2943](#2943))
([6ba9e45](6ba9e45))


### Bug Fixes

* **py:** Load and resolve lower_funcs in extensions
([#2924](#2924))
([6dfc8e3](6dfc8e3))


### Documentation

* Add specification to sphinx docs
([#2907](#2907))
([46ea04b](46ea04b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Agustín Borgna <agustin.borgna@quantinuum.com>
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