diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1bda47e0631a0..9f9bcd78c07b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.284 + rev: v0.0.285 hooks: - id: ruff args: [--exit-non-zero-on-fix] diff --git a/pandas/core/common.py b/pandas/core/common.py index 1679e01ff9fe1..8fd8b10c6fc32 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -138,7 +138,7 @@ def is_bool_indexer(key: Any) -> bool: elif isinstance(key, list): # check if np.array(key).dtype would be bool if len(key) > 0: - if type(key) is not list: + if type(key) is not list: # noqa: E721 # GH#42461 cython will raise TypeError if we pass a subclass key = list(key) return lib.is_bool_list(key) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index ee36a3515c4b3..721f4f5e1c494 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -7528,7 +7528,7 @@ def ensure_index(index_like: Axes, copy: bool = False) -> Index: index_like = list(index_like) if isinstance(index_like, list): - if type(index_like) is not list: + if type(index_like) is not list: # noqa: E721 # must check for exactly list here because of strict type # check in clean_index_list index_like = list(index_like) diff --git a/pandas/core/internals/construction.py b/pandas/core/internals/construction.py index 2290cd86f35e6..82b25955d0def 100644 --- a/pandas/core/internals/construction.py +++ b/pandas/core/internals/construction.py @@ -903,7 +903,7 @@ def _list_of_dict_to_arrays( # assure that they are of the base dict class and not of derived # classes - data = [d if type(d) is dict else dict(d) for d in data] + data = [d if type(d) is dict else dict(d) for d in data] # noqa: E721 content = lib.dicts_to_array(data, list(columns)) return content, columns