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 tuple deserialization. #343

Merged
merged 1 commit into from
Feb 3, 2022
Merged

Conversation

pchanial
Copy link
Contributor

@pchanial pchanial commented Feb 2, 2022

Fixing a typo

>>> deserialize(tuple[int, ...], [1, 2, 3])
[1, 2, 3]

@codecov-commenter
Copy link

Codecov Report

Merging #343 (f8a6494) into master (af1bf4a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
+ Coverage   86.13%   86.15%   +0.01%     
==========================================
  Files          67       67              
  Lines        5879     5879              
  Branches     1218     1218              
==========================================
+ Hits         5064     5065       +1     
+ Misses        596      595       -1     
  Partials      219      219              
Impacted Files Coverage Δ
apischema/deserialization/__init__.py 98.97% <100.00%> (ø)
apischema/deserialization/methods.py 84.87% <0.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45f9e84...f8a6494. Read the comment docs.

@wyfo
Copy link
Owner

wyfo commented Feb 3, 2022

OMG, that was a big mistake of me…

@pchanial
Copy link
Contributor Author

pchanial commented Feb 3, 2022

What do you prefer to make the test pass for Python < 3.9? pytest's skipif or importing Tuple from typing_extensions? Tuple cannot be imported from typing_extensions
I'll add a test, so that there will be test_variadic_tuple_collection and test_tuple_collection.

bijection(Tuple[2 * (Union[int, SimpleDataclass],)], data, expected)


@pytest.mark.skipif(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need of skipif. The error was in fact a side effect resolved in #344

@wyfo wyfo merged commit afa7478 into wyfo:master Feb 3, 2022
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

3 participants