-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STYLE enable pylint's redefined-outer-name #49671
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
STYLE enable pylint's redefined-outer-name #49671
Conversation
….py, pandas/core/indexes/base.py
….py, pandas/core/indexes/base.py
pandas/core/dtypes/cast.py
Outdated
from datetime import ( | ||
datetime, | ||
timedelta, | ||
datetime as datetime_func, | ||
timedelta as timedelta_func, | ||
) |
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.
would import datetime as dt
(and then dt.datetime
, dt.timedelta
) work?
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.
sounds good.
pandas/core/indexes/base.py
Outdated
from pandas.core import ( | ||
missing as missing_func, | ||
arraylike, | ||
missing, | ||
ops, | ||
) |
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.
missing
isn't a function, so missing_func
wouldn't be the best name
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.
what was the issue with what you had before (from pandas.core.missing import clean_reindex_fill_method
)?
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.
The build pipeline failed at https://github.com/pandas-dev/pandas/actions/runs/3452096357/jobs/5761771671 which is failing still with missing_func. from pandas.core.missing import clean_reindex_fill_method worked locally but since pipeline failed , chaged it.
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 was fine, you just need to run pre-commit
on the files you've changed, check the contributing guide for how to do that
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.
Thanks did run it.
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.
cool, should be good now thanks
….py, pandas/core/indexes/base.py
….py, pandas/core/indexes/base.py
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.
Looks good to me, thanks @alphacrack , though the
import pandas_dtype as pandas_dtype_func
pattern isn't already present in pandas (I think), so leaving open for a bit in case others have objections
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.
thanks @alphacrack , if noone has objections I'll merge later
* fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py Co-authored-by: bishwas jha <[email protected]>
* fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py * fix warning for pandas/core/dtypes/cast.py, pandas/core/dtypes/dtypes.py, pandas/core/indexes/base.py Co-authored-by: bishwas jha <[email protected]>
Fixed warnings for the following files :-