Repository navigation
Conversation
…property Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
|
Hi @phanak-sap, @filak-sap, could you please review this when you have a moment? In short: Keep the first value list when several annotations target one property. I think this will be really valuable. You may want to take a look. Thanks! |
1 similar comment
|
Hi @phanak-sap, @filak-sap, could you please review this when you have a moment? In short: Keep the first value list when several annotations target one property. I think this will be really valuable. You may want to take a look. Thanks! |
|
Hi team, could you please review this when you have a moment? In short: Keep the first value list when several annotations target one property. I think this will be really valuable. You may want to take a look. Thanks! |
|
#331 must be merged first for for build passing. But for your suggestions - it seems on first glance it does not actually fix #142. it is just a quick workaround. Yeah, I know I myself noted that as an option, but actual fix would be preferred. For that, somebody who uses Pyodata and/or knows odata protocol would be prefered - while my gut feel is that this is just quick AI prompt and send. I especially do not like the So thank you for the PR, but I politely decline this one. The influx of quick AI generated PRs for stalled issues just for pushing up personal PRs numbers somehow started to be noticeable even to niche project like this. |
Hello maintainers, I'd like to help with issue #142 by offering a change for you to review that handles multiple annotations on the same target without reporting an invalid schema.
Metadata that carries more than one unqualified
ValueListannotation for the same property made the parser raiseCannot replace value helper ..., so the schema was reported invalid (and a strict error policy aborted). A property can only hold one value helper here, so the first one is now kept and each later one is logged as ignored; the schema stays valid.Fixes #142. Thanks for attaching the metadata file and
reproduce.py; with your files theis_validresult went from False to True on this change.Tests: new
test_annot_v_l_duplicate_targetintests/test_model_v2.py(two ValueList annotations on one property: schema valid, first one kept, warning logged). It fails with the originalRuntimeErrorwhen the change inmodel.pyis reverted. The fulltestsdirectory ran with pytest on Python 3.14: 319 passed. I did not run pylint (it crashes in my environment on this Python version) or the older Python versions from the CI matrix.I took the "keep one and warn" route rather than ignoring all annotations (option B in the issue), because value helpers are used by the model today. Happy to change it if you prefer the other.