Skip to content

Commit f569301

Browse files
authored
STYLE: fix pylints redefined-outer-name warnings (#49669)
* fix pylints redefined-outer-name warnings * fix pre-commit error * fix pre-commit error * fix the changes requested
1 parent e634b34 commit f569301

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pandas/core/dtypes/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ def is_dataclass(item):
417417
418418
"""
419419
try:
420-
from dataclasses import is_dataclass
420+
import dataclasses
421421

422-
return is_dataclass(item) and not isinstance(item, type)
422+
return dataclasses.is_dataclass(item) and not isinstance(item, type)
423423
except ImportError:
424424
return False

pandas/core/frame.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6493,9 +6493,8 @@ def drop_duplicates(
64936493

64946494
inplace = validate_bool_kwarg(inplace, "inplace")
64956495
ignore_index = validate_bool_kwarg(ignore_index, "ignore_index")
6496-
duplicated = self.duplicated(subset, keep=keep)
64976496

6498-
result = self[-duplicated]
6497+
result = self[-self.duplicated(subset, keep=keep)]
64996498
if ignore_index:
65006499
result.index = default_index(len(result))
65016500

0 commit comments

Comments
 (0)