Skip to content

for issue #49656 STYLE enable pylint's redefined-outer-name #49708

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 12 commits into from
Nov 15, 2022
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from __future__ import annotations

import collections
from datetime import timedelta
from datetime import timedelta as td
Copy link
Member

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.timedelta work?

import gc
import json
import operator
import pickle
import re
Expand Down Expand Up @@ -133,7 +132,7 @@
from pandas.core import (
algorithms as algos,
arraylike,
common as com,
common,
Copy link
Member

Choose a reason for hiding this comment

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

does it work to just import the various functions from pandas.core.common? from pandas.core.common import get_rename_function, ...?

indexing,
missing,
nanops,
Expand Down Expand Up @@ -6318,6 +6317,7 @@ def _convert(
self: NDFrameT,
datetime: bool_t = False,
numeric: bool_t = False,
# td: bool_t = False,
Copy link
Member

Choose a reason for hiding this comment

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

remove this

timedelta: bool_t = False,
) -> NDFrameT:
"""
Expand Down Expand Up @@ -11538,7 +11538,7 @@ def ewm(
axis = self._get_axis_number(axis)
return ExponentialMovingWindow(
self,
com=com,
com=commmon,
Copy link
Member

Choose a reason for hiding this comment

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

this shouldn't change

span=span,
halflife=halflife,
alpha=alpha,
Expand Down