Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test[python]: Fix type indexing py3.7 test error #4416

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

zundertj
Copy link
Collaborator

In #4058, I enforce strict type equality checks in mypy. Most cases can be fixed with typing.cast. For generic types such as tuple, we cannot use this yet, because py3.7 does not allow this, and thus we need a type: ignore. This one case of using the cast slipped through, fixing this here.

As noted by #4413 (comment)

In pola-rs#4058, I enforce strict type equality checks in mypy. Most cases can be fixed with `typing.cast`. For generic types such as tuple, we cannot use this yet, because py3.7 does not allow this, and thus we need a `type: ignore`. This one case of using the cast slipped through, fixing this here.

As noted by pola-rs#4413 (comment)
@github-actions github-actions bot added the python Related to Python Polars label Aug 14, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #4416 (bcea7df) into master (beb802a) will decrease coverage by 4.72%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4416      +/-   ##
==========================================
- Coverage   78.98%   74.26%   -4.73%     
==========================================
  Files         483      483              
  Lines       77094    77111      +17     
==========================================
- Hits        60895    57266    -3629     
- Misses      16199    19845    +3646     
Impacted Files Coverage Δ
...ars-arrow/src/kernels/rolling/no_nulls/variance.rs 88.55% <100.00%> (+0.23%) ⬆️
polars/polars-lazy/src/logical_plan/aexpr.rs 84.21% <100.00%> (+1.06%) ⬆️
polars/polars-lazy/src/physical_plan/planner/lp.rs 83.16% <100.00%> (-4.93%) ⬇️
polars/polars-io/src/tests.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-lazy/src/lib.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-time/src/lib.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-utils/src/lib.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-io/src/prelude.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-time/src/windows/test.rs 0.00% <0.00%> (-100.00%) ⬇️
polars/polars-io/src/avro/mod.rs 0.00% <0.00%> (-95.59%) ⬇️
... and 133 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ritchie46
Copy link
Member

Thanks for the quick fix!

@ritchie46 ritchie46 changed the title fix[python]: Fix type indexing py3.7 test error chore[python]: Fix type indexing py3.7 test error Aug 14, 2022
@ritchie46 ritchie46 changed the title chore[python]: Fix type indexing py3.7 test error test[python]: Fix type indexing py3.7 test error Aug 14, 2022
@ritchie46 ritchie46 merged commit 2a7d835 into pola-rs:master Aug 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants