Skip to content

CLN: unused import _libs/reduction + remove "noqa" comment in _libs/__init__.py #33142

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
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions pandas/_libs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# flake8: noqa
__all__ = [
Copy link
Member

Choose a reason for hiding this comment

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

Is this required? I think unnecessary since we don't hide or disallow importing anything that appears here globally

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 __all__ is required in order to remove the # flake8: noqa comment, otherwise flake8 complains about unused imports.

Copy link
Member Author

Choose a reason for hiding this comment

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

But not a deal breaker for me, I only made this change because opening a PR just for the LooseVersion seemed too small.

Copy link
Member

Choose a reason for hiding this comment

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

Ah forgot about the flake8 warning; I think this is OK as well

"NaT",
"NaTType",
"OutOfBoundsDatetime",
"Period",
"Timedelta",
"Timestamp",
"iNaT",
]

from .tslibs import (

from pandas._libs.tslibs import (
NaT,
NaTType,
OutOfBoundsDatetime,
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/reduction.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from copy import copy
from distutils.version import LooseVersion

from cython import Py_ssize_t
from cpython.ref cimport Py_INCREF
Expand Down