-
-
Notifications
You must be signed in to change notification settings - Fork 228
feat!: Prefer title
attributes when naming Python parameters/properties.
#606
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
Conversation
69301df
to
d9001ee
Compare
Codecov Report
@@ Coverage Diff @@
## main #606 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 1713 1714 +1
=========================================
+ Hits 1713 1714 +1
Continue to review full report at Codecov.
|
Thanks for this! Looks good to me, might be overkill but I can see it being desirable to have an exclude/include configurability for this behavior akin to something like #560 - I can take a look at doing this myself if that makes sense (probably doesn't have to be part of this PR) I saw a the following error in both of the below situations, which is to be expected:
Titles collide, previously not an error but will be one now. properties:
b:
title: a
c:
title: a Title collides with property key, previously and still an error. properties:
_a:
title: a
a: {} |
I don't see a way to solve for the second case—there is always going to be some risk of collision, I think the best we can do is give as many tools as possible to avoid them (e.g., change/set |
@jselig-rigetti thinking about this again, I think the better move is going to be to swap around the behavior. So, instead of always preferring |
Closing in favor of an override for property names via config (@jselig-rigetti is that somewhere you can upstream it?) |
Closes #602
@jselig-rigetti will you give this a try to ensure it fixes the issue you bumped into? And also give it a review please 😄