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

Adjacent sub-elements support added. #143

Merged
merged 1 commit into from Nov 26, 2023
Merged

Conversation

dapper91
Copy link
Owner

@dapper91 dapper91 commented Nov 26, 2023

Adjacent sub-elements support added.

See the example:

<Products>
    <product status="running">Several launch vehicles</product>
    <launched>2013</launched>
    <product status="running">Starlink</product>
    <launched>2019</launched>
    <product status="development">Starship</product>
</Products>
class Product(BaseXmlModel, tag='product'):
    status: str = attr()
    title: str


class Launch(RootXmlModel[int], tag='launched'):
    pass


class Products(RootXmlModel):
    root: List[Tuple[Product, Optional[Launch]]]

For more information see.

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb8efc0) 91.63% compared to head (a9a3759) 91.79%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #143      +/-   ##
==========================================
+ Coverage   91.63%   91.79%   +0.16%     
==========================================
  Files          25       25              
  Lines        1375     1378       +3     
==========================================
+ Hits         1260     1265       +5     
+ Misses        115      113       -2     
Flag Coverage Δ
unittests 91.79% <100.00%> (+0.16%) ⬆️

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.

@dapper91 dapper91 changed the title Homogeneous collection of heterogeneous ones support added. Adjacent sub-elements support added. Nov 26, 2023
@dapper91 dapper91 merged commit f704581 into dev Nov 26, 2023
7 checks passed
@dapper91 dapper91 mentioned this pull request Nov 26, 2023
Merged
@dapper91 dapper91 deleted the list-of-tuples-support branch December 7, 2023 14:47
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.

None yet

2 participants