Skip to content

Remove unused functions, cimports #19360

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 6 commits into from
Jan 24, 2018
Merged

Conversation

jbrockmendel
Copy link
Member

Miscellaneous cleanup, use util.is_array instead of isinstance, that kind of thing.

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

@codecov
Copy link

codecov bot commented Jan 23, 2018

Codecov Report

Merging #19360 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19360      +/-   ##
==========================================
+ Coverage   91.54%   91.58%   +0.03%     
==========================================
  Files         150      150              
  Lines       48702    48694       -8     
==========================================
+ Hits        44585    44595      +10     
+ Misses       4117     4099      -18
Flag Coverage Δ
#multiple 89.95% <100%> (+0.03%) ⬆️
#single 41.72% <50%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexing.py 93.11% <ø> (+0.49%) ⬆️
pandas/core/sparse/series.py 95.32% <100%> (ø) ⬆️
pandas/plotting/_converter.py 66.95% <0%> (+1.73%) ⬆️

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 9872d67...77bbcf4. Read the comment docs.

or isinstance(obj, list) and len(obj) == cnt \
or getattr(obj, 'shape', None) == (cnt,):
if (util.is_array(obj) or
isinstance(obj, list) and len(obj) == cnt or
Copy link
Contributor

Choose a reason for hiding this comment

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

could do PyListCheck here

Copy link
Contributor

Choose a reason for hiding this comment

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

or change the other below, I find this slightly non-idiomatic

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 looks like cython automatically converts to PyList_Check.

Agreed on a lot of the idiomatic point. There's a lot of built-up debris in _libs.

@jreback jreback added the Clean label Jan 23, 2018
jbrockmendel added a commit to jbrockmendel/pandas that referenced this pull request Jan 23, 2018
@jreback jreback added this to the 0.23.0 milestone Jan 24, 2018
@jreback
Copy link
Contributor

jreback commented Jan 24, 2018

thanks!

@jreback jreback merged commit 7feba58 into pandas-dev:master Jan 24, 2018
@jbrockmendel jbrockmendel deleted the cleanup branch February 11, 2018 21:59
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