Skip to content

CLN: removed unused import #32518

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 2 commits into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions pandas/_libs/tslibs/np_datetime.pyx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from cpython.object cimport Py_EQ, Py_NE, Py_GE, Py_GT, Py_LT, Py_LE

from cpython.datetime cimport (datetime, date,
PyDateTime_IMPORT,
PyDateTime_GET_YEAR, PyDateTime_GET_MONTH,
PyDateTime_GET_DAY, PyDateTime_DATE_GET_HOUR,
Copy link
Member

Choose a reason for hiding this comment

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

i find the year-month-day-hour-minute-second ordering clearer than the alphabetical ordering. its not worth bikeshedding, which is why id discourage these for the most part

also makes it harder to see what the actual removed imports are (datetime and date, right?). That part im on board with.

Copy link
Member Author

Choose a reason for hiding this comment

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

i find the year-month-day-hour-minute-second ordering clearer than the alphabetical ordering. its not worth bikeshedding, which is why id discourage these for the most part

Agreed, I have no idea how to enforce it with isort

also makes it harder to see what the actual removed imports are (datetime and date, right?). That part im on board with.

Correct, that's why I did it in two commits and not in one, as you an see after the removal of the unused imports what is left looks pretty ugly, so I figured I run isort on that specific import block.

PyDateTime_DATE_GET_MINUTE,
PyDateTime_DATE_GET_SECOND,
PyDateTime_DATE_GET_MICROSECOND)
from cpython.datetime cimport (
PyDateTime_DATE_GET_HOUR,
PyDateTime_DATE_GET_MICROSECOND,
PyDateTime_DATE_GET_MINUTE,
PyDateTime_DATE_GET_SECOND,
PyDateTime_GET_DAY,
PyDateTime_GET_MONTH,
PyDateTime_GET_YEAR,
PyDateTime_IMPORT,
)
PyDateTime_IMPORT

from numpy cimport int64_t
Expand Down