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

Improve use of isinstance. #10734

Merged
merged 1 commit into from
Apr 26, 2022
Merged

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Apr 26, 2022

This PR combines a few isinstance checks to reduce the complexity of the logic.

Note: Some of these were identified by https://codereview.doctor/rapidsai/cudf. In some places, the bot correctly identified a problem but its suggestions were invalid or incomplete. I identified steps for improvement beyond what the bot suggested for most of these cases.

@bdice bdice added code quality Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 26, 2022
@bdice bdice self-assigned this Apr 26, 2022
@bdice bdice requested a review from a team as a code owner April 26, 2022 14:38
@bdice bdice requested a review from shwina April 26, 2022 14:38
@bdice bdice requested a review from rgsl888prabhu April 26, 2022 14:38
@galipremsagar galipremsagar added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Apr 26, 2022
@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #10734 (87a73e4) into branch-22.06 (3c13ef1) will increase coverage by 0.05%.
The diff coverage is 90.96%.

❗ Current head 87a73e4 differs from pull request most recent head 8e0c9e3. Consider uploading reports for the commit 8e0c9e3 to get more accurate results

@@               Coverage Diff                @@
##           branch-22.06   #10734      +/-   ##
================================================
+ Coverage         86.33%   86.39%   +0.05%     
================================================
  Files               140      142       +2     
  Lines             22289    22300      +11     
================================================
+ Hits              19244    19266      +22     
+ Misses             3045     3034      -11     
Impacted Files Coverage Δ
python/cudf/cudf/_fuzz_testing/json.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/_base_index.py 85.45% <ø> (ø)
python/cudf/cudf/core/dtypes.py 97.30% <ø> (ø)
python/cudf/cudf/core/index.py 92.31% <ø> (ø)
python/cudf/cudf/core/tools/numeric.py 89.24% <ø> (ø)
python/cudf/cudf/testing/dataset_generator.py 73.25% <ø> (ø)
python/cudf/cudf/utils/cudautils.py 65.74% <ø> (+5.90%) ⬆️
python/cudf/cudf/utils/gpu_utils.py 50.00% <0.00%> (-4.29%) ⬇️
python/cudf/cudf/utils/ioutils.py 79.60% <ø> (ø)
python/cudf/cudf/utils/utils.py 90.35% <ø> (+0.06%) ⬆️
... and 40 more

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 ac27757...8e0c9e3. Read the comment docs.

@galipremsagar
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 47740bc into rapidsai:branch-22.06 Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants