Skip to content

Commit e8cda27

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a105075 commit e8cda27

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

pandas/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def is_bool_indexer(key: Any) -> bool:
145145
elif isinstance(key, list):
146146
# check if np.array(key).dtype would be bool
147147
if len(key) > 0:
148-
if type(key) is not list: # noqa: E721
148+
if type(key) is not list:
149149
# GH#42461 cython will raise TypeError if we pass a subclass
150150
key = list(key)
151151
return lib.is_bool_list(key)

pandas/core/indexes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7528,7 +7528,7 @@ def ensure_index(index_like: Axes, copy: bool = False) -> Index:
75287528
index_like = list(index_like)
75297529

75307530
if isinstance(index_like, list):
7531-
if type(index_like) is not list: # noqa: E721
7531+
if type(index_like) is not list:
75327532
# must check for exactly list here because of strict type
75337533
# check in clean_index_list
75347534
index_like = list(index_like)

pandas/core/internals/construction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ def _list_of_dict_to_arrays(
842842

843843
# assure that they are of the base dict class and not of derived
844844
# classes
845-
data = [d if type(d) is dict else dict(d) for d in data] # noqa: E721
845+
data = [d if type(d) is dict else dict(d) for d in data]
846846

847847
content = lib.dicts_to_array(data, list(columns))
848848
return content, columns

pandas/core/tools/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class FulldatetimeDict(YearMonthDayDict, total=False):
129129
def _guess_datetime_format_for_array(arr, dayfirst: bool | None = False) -> str | None:
130130
# Try to guess the format based on the first non-NaN element, return None if can't
131131
if (first_non_null := tslib.first_non_null(arr)) != -1:
132-
if type(first_non_nan_element := arr[first_non_null]) is str: # noqa: E721
132+
if type(first_non_nan_element := arr[first_non_null]) is str:
133133
# GH#32264 np.str_ object
134134
guessed_format = guess_datetime_format(
135135
first_non_nan_element, dayfirst=dayfirst

pandas/tests/frame/test_repr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def test_repr_should_return_str(self):
3838
index1 = ["\u03c3", "\u03c4", "\u03c5", "\u03c6"]
3939
cols = ["\u03c8"]
4040
df = DataFrame(data, columns=cols, index=index1)
41-
assert type(df.__repr__()) is str # noqa: E721
41+
assert type(df.__repr__()) is str
4242

4343
ser = df[cols[0]]
44-
assert type(ser.__repr__()) is str # noqa: E721
44+
assert type(ser.__repr__()) is str
4545

4646
def test_repr_bytes_61_lines(self):
4747
# GH#12857

0 commit comments

Comments
 (0)