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

CLN: General cleanup in _libs/lib.pyx #33532

Merged
merged 2 commits into from
Apr 14, 2020

Conversation

ShaharNaveh
Copy link
Member

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

@@ -287,6 +277,7 @@ def fast_unique_multiple(list arrays, sort: bool = True):
try:
uniques.sort()
except TypeError:
import warnings
Copy link
Member Author

Choose a reason for hiding this comment

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

Really unsure about this specific change, the reason I made this change is to avoid going through the python space for no reason, we are not getting into the except block that often (that I know about).

Comment on lines 1 to 5
from collections import abc
from decimal import Decimal
from fractions import Fraction
from numbers import Number

import sys
import warnings

import cython
from cython import Py_ssize_t
cimport cython
from cython cimport Py_ssize_t
Copy link
Member Author

Choose a reason for hiding this comment

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

The import that are removed are:

from fractions import Fraction
from numbers import Number
import sys

@jbrockmendel
Copy link
Member

Um... why? I try to be encouraging, but i dont see the point of any of this.

@ShaharNaveh
Copy link
Member Author

Um... why? I try to be encouraging,

You are doing a wonderful job :)

but i dont see the point of any of this.

I'll remove the noise so you can see the actual changes.

@jbrockmendel
Copy link
Member

Much better, thanks. I think parsers.pyx has an unnecessary import of icom too.

The lowest-hanging fruit for CLN PRs at this point is going through the tests and identifying giant tests that can be split into targeted tests.

@WillAyd WillAyd added the Clean label Apr 13, 2020
@WillAyd
Copy link
Member

WillAyd commented Apr 13, 2020

Looks good whenever green

@WillAyd WillAyd added this to the 1.1 milestone Apr 13, 2020
@WillAyd WillAyd merged commit 556e1c2 into pandas-dev:master Apr 14, 2020
@WillAyd
Copy link
Member

WillAyd commented Apr 14, 2020

Thanks @MomIsBestFriend

CloseChoice pushed a commit to CloseChoice/pandas that referenced this pull request Apr 20, 2020
@ShaharNaveh ShaharNaveh deleted the CLN-Imports-_libs-lib branch May 3, 2021 12:28
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.

3 participants