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

refactor(hugr-py): freeze custom ops #1279

Merged
merged 1 commit into from
Jul 9, 2024
Merged

refactor(hugr-py): freeze custom ops #1279

merged 1 commit into from
Jul 9, 2024

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Jul 8, 2024

BEGIN_COMMIT_OVERRIDE
feat(hugr-py)!: ops.Custom is now a frozen dataclass

Makes singletons like Measure = MeasureDef() safer, as the instance isn't going to get mutated between uses

BREAKING CHANGE: dataclasses that derive from ops.Custom now have to be frozen, and instances cannot be mutated.
END_COMMIT_OVERRIDE

Makes singletons like `Measure = MeasureDef()` safer, as the instance isn't going to get mutated between uses
@ss2165 ss2165 requested a review from a team as a code owner July 8, 2024 16:28
@ss2165 ss2165 requested a review from doug-q July 8, 2024 16:28
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.11%. Comparing base (8ba90f9) to head (0cc97b3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1279   +/-   ##
=======================================
  Coverage   87.11%   87.11%           
=======================================
  Files         103      103           
  Lines       19344    19344           
  Branches    17174    17174           
=======================================
  Hits        16851    16851           
  Misses       1715     1715           
  Partials      778      778           
Flag Coverage Δ
python 91.38% <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.

@ss2165 ss2165 added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit 94702d2 Jul 9, 2024
20 checks passed
@ss2165 ss2165 deleted the ss/freeze branch July 9, 2024 08:30
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