-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
MyPy cleanup and absolute imports in pandas.core.dtypes.common #21008
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
Conversation
ABCIndexClass, ABCDateOffset) | ||
from .inference import is_string_like, is_list_like | ||
from .inference import * # noqa | ||
from pandas.core.dtypes.dtypes import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite some other places where we use relative imports as well (but of course not consistently ..), but so why change those and not others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn’t the relative import that mypy was complaining about as much as the starred import. I just figured I’d convert the relative to absolute while I was touching the module
Codecov Report
@@ Coverage Diff @@
## master #21008 +/- ##
==========================================
- Coverage 91.9% 91.9% -0.01%
==========================================
Files 153 153
Lines 49549 49548 -1
==========================================
- Hits 45539 45538 -1
Misses 4010 4010
Continue to review full report at Codecov.
|
looks fine. can you rebase just to be sure. merge on green. |
Starting the conversation towards #14468
There were a couple misplaced annotations below docstrings that were causing mypy to choke when running:
A starred import in pandas.core.dtypes.common was responsible for a lot of complaints from mypy. These were being intentionally suppressed by flake8 but I figure it makes sense to clean up and convert into absolute imports