Skip to content

Commit ade0483

Browse files
authored
Updated ruff pre-commit version and modified few lines according to it. (#54639)
* Updated ruff pre-commit version and modified few lines according to it. * reverted some changes in files, just updating the ruff version. * Added #noqa E721 comment for the lines where new ruff is failing.
1 parent 04f03fb commit ade0483

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.0.284
27+
rev: v0.0.285
2828
hooks:
2929
- id: ruff
3030
args: [--exit-non-zero-on-fix]

pandas/core/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def is_bool_indexer(key: Any) -> bool:
138138
elif isinstance(key, list):
139139
# check if np.array(key).dtype would be bool
140140
if len(key) > 0:
141-
if type(key) is not list:
141+
if type(key) is not list: # noqa: E721
142142
# GH#42461 cython will raise TypeError if we pass a subclass
143143
key = list(key)
144144
return lib.is_bool_list(key)

pandas/core/indexes/base.py

+1-1
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:
7531+
if type(index_like) is not list: # noqa: E721
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def _list_of_dict_to_arrays(
903903

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

908908
content = lib.dicts_to_array(data, list(columns))
909909
return content, columns

0 commit comments

Comments
 (0)