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

fix: IndexError on node slicing #1500

Merged
merged 1 commit into from
Sep 3, 2024
Merged

fix: IndexError on node slicing #1500

merged 1 commit into from
Sep 3, 2024

Conversation

aborgna-q
Copy link
Collaborator

Fixes #1498

Python lets you slice out of range; [0,1][90:99] returns an empty list. This PR makes node slicing behave as such.

@aborgna-q aborgna-q requested a review from a team as a code owner September 2, 2024 16:02
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.29%. Comparing base (a38e58c) to head (90da80e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1500   +/-   ##
=======================================
  Coverage   87.29%   87.29%           
=======================================
  Files         126      126           
  Lines       21633    21633           
  Branches    18662    18662           
=======================================
  Hits        18884    18884           
  Misses       1979     1979           
  Partials      770      770           
Flag Coverage Δ
python 92.72% <100.00%> (ø)

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.

@aborgna-q aborgna-q added this pull request to the merge queue Sep 3, 2024
Merged via the queue into main with commit a32bd84 Sep 3, 2024
20 checks passed
@aborgna-q aborgna-q deleted the ab/fix-node-slice branch September 3, 2024 09:27
github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.8.1](hugr-py-v0.8.0...hugr-py-v0.8.1)
(2024-09-04)


### Features

* Export the collections extension
([#1506](#1506))
([70e0a64](70e0a64))


### Bug Fixes

* Export the float ops extension
([#1517](#1517))
([4cbe890](4cbe890))
* IndexError on node slicing
([#1500](#1500))
([a32bd84](a32bd84))
* Update collections extension
([#1518](#1518))
([60e1da0](60e1da0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

IndexError when slicing a node with no ports
2 participants