Skip to content

update imports; remove unused #18298

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

Merged
merged 1 commit into from
Nov 17, 2017
Merged

Conversation

jbrockmendel
Copy link
Member

General cleanup. flake8 doesn't catch unused cimports.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@codecov
Copy link

codecov bot commented Nov 15, 2017

Codecov Report

Merging #18298 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18298      +/-   ##
==========================================
- Coverage    91.4%   91.38%   -0.02%     
==========================================
  Files         164      164              
  Lines       49880    49880              
==========================================
- Hits        45592    45583       -9     
- Misses       4288     4297       +9
Flag Coverage Δ
#multiple 89.19% <100%> (ø) ⬆️
#single 39.42% <40%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/datetimes.py 95.48% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

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 148ed63...eb632c7. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 15, 2017

Codecov Report

Merging #18298 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18298      +/-   ##
==========================================
- Coverage    91.4%   91.38%   -0.02%     
==========================================
  Files         164      164              
  Lines       49880    49880              
==========================================
- Hits        45592    45583       -9     
- Misses       4288     4297       +9
Flag Coverage Δ
#multiple 89.19% <100%> (ø) ⬆️
#single 39.42% <40%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/datetimes.py 95.48% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

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 148ed63...eb632c7. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Nov 15, 2017

General cleanup. flake8 doesn't catch unused cimports.

can we make that happen?

@jreback jreback added the Clean label Nov 15, 2017
@jreback jreback added this to the 0.22.0 milestone Nov 15, 2017
get_dst_info)
from tslibs.fields import (
get_date_name_field, get_start_end_field, get_date_field,
build_field_sarray)
Copy link
Contributor

Choose a reason for hiding this comment

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

build_field_sarray I think can be completely removed from the codebase

Copy link
Member Author

Choose a reason for hiding this comment

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

It's used in tslibs.resolution.

There are a few funcs scattered around _libs that aren't used anywhere. Didn't remove them in this PR to keep it uncontroversial. lib.arrmap and index.get_value_at come to mind.

@jbrockmendel
Copy link
Member Author

can we make that happen?

Not that I'm aware of. I tried piping the source into flake8 via a sed replacement cimport-->import, but it still chokes when it gets to python syntax errors.

Ultimately I think the effort to build+maintain a flake8 patch to handle this would be more than the effort to just manually check the cimports once in a while.

@jbrockmendel
Copy link
Member Author

Would this be easier if broken up into smaller pieces? I'm hesitant to touch the affected files while this is outstanding.

@jreback jreback merged commit d5c4908 into pandas-dev:master Nov 17, 2017
@jreback
Copy link
Contributor

jreback commented Nov 17, 2017

thanks!

@jbrockmendel jbrockmendel deleted the cleanery2 branch December 8, 2017 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants