Skip to content

STYLE: fix pylint redefined-oute-name warnings (pandas-dev#49656) #49668

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

Closed
Closed
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
4 changes: 2 additions & 2 deletions pandas/core/internals/concat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

import copy
import copy as stdlib_copy
import itertools
from typing import (
TYPE_CHECKING,
Expand Down Expand Up @@ -691,7 +691,7 @@ def _trim_join_unit(join_unit: JoinUnit, length: int) -> JoinUnit:
else:
extra_block = join_unit.block

extra_indexers = copy.copy(join_unit.indexers)
extra_indexers = stdlib_copy.copy(join_unit.indexers)
extra_indexers[0] = extra_indexers[0][length:]
join_unit.indexers[0] = join_unit.indexers[0][:length]

Expand Down
4 changes: 2 additions & 2 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from __future__ import annotations

import copy
import copy as stdlib_copy
import datetime
from functools import partial
import string
Expand Down Expand Up @@ -1637,7 +1637,7 @@ def get_join_indexers(

lkey, rkey, count = _factorize_keys(lkey, rkey, sort=sort, how=how)
# preserve left frame order if how == 'left' and sort == False
kwargs = copy.copy(kwargs)
kwargs = stdlib_copy.copy(kwargs)
if how in ("left", "right"):
kwargs["sort"] = sort
join_func = {
Expand Down
9 changes: 4 additions & 5 deletions pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

import numpy as np

from pandas._libs import json
from pandas._libs.json import(
loads,
dumps,
)
from pandas._libs.tslibs import iNaT
from pandas._typing import (
CompressionOptions,
Expand Down Expand Up @@ -73,10 +76,6 @@

FrameSeriesStrT = TypeVar("FrameSeriesStrT", bound=Literal["frame", "series"])

loads = json.loads
dumps = json.dumps


# interface to/from
@overload
def to_json(
Expand Down