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 ad dt
Copy link
Member

Choose a reason for hiding this comment

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

this isn't valid syntax...

import gc
import json
import operator
import pickle
import re
Expand Down Expand Up @@ -133,12 +132,12 @@
from pandas.core import (
algorithms as algos,
arraylike,
common as com,
indexing,
missing,
nanops,
sample,
)
from pandas.core.common import get_rename_function as com
Copy link
Member

Choose a reason for hiding this comment

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

no just

from pandas.core.common import get_rename_function

and then use get_rename_function instead of com.get_rename_function

likewise for any other com. functions

from pandas.core.array_algos.replace import should_use_regex
from pandas.core.arrays import ExtensionArray
from pandas.core.base import PandasObject
Expand Down Expand Up @@ -6318,7 +6317,8 @@ def _convert(
self: NDFrameT,
datetime: bool_t = False,
numeric: bool_t = False,
timedelta: 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

dt.timedelta: 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.

this shouldn't change, it's a function argument

) -> NDFrameT:
"""
Attempt to infer better dtype for object columns.
Expand Down