Skip to content

Commit b0237ed

Browse files
authored
STYLE: fix pylint style checks for inherit-non-class. (#48897)
* fix pylint for non-class-inherit and add pre-commit changes * move ExtensionArraySupportsAnyAll to below ExtensionArray * move if TYPE_CHECKING back up to line 94 * remove erroneous space
1 parent dc79600 commit b0237ed

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

pandas/core/arrays/base.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,11 @@
9393

9494
if TYPE_CHECKING:
9595

96-
class ExtensionArraySupportsAnyAll("ExtensionArray"):
97-
def any(self, *, skipna: bool = True) -> bool:
98-
pass
99-
100-
def all(self, *, skipna: bool = True) -> bool:
101-
pass
102-
10396
from pandas._typing import (
10497
NumpySorter,
10598
NumpyValueArrayLike,
10699
)
107100

108-
109101
_extension_array_shared_docs: dict[str, str] = {}
110102

111103
ExtensionArrayT = TypeVar("ExtensionArrayT", bound="ExtensionArray")
@@ -1686,6 +1678,14 @@ def __array_ufunc__(self, ufunc: np.ufunc, method: str, *inputs, **kwargs):
16861678
return arraylike.default_array_ufunc(self, ufunc, method, *inputs, **kwargs)
16871679

16881680

1681+
class ExtensionArraySupportsAnyAll(ExtensionArray):
1682+
def any(self, *, skipna: bool = True) -> bool:
1683+
pass
1684+
1685+
def all(self, *, skipna: bool = True) -> bool:
1686+
pass
1687+
1688+
16891689
class ExtensionOpsMixin:
16901690
"""
16911691
A base class for linking the operators to their dunder names.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ disable = [
4343
"c-extension-no-member",
4444
"function-redefined",
4545
"import-error",
46-
"inherit-non-class",
4746
"invalid-repr-returned",
4847
"invalid-unary-operand-type",
4948
"misplaced-bare-raise",

0 commit comments

Comments
 (0)