Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STYLE: fix pylint style checks for inherit-non-class. #48897

Merged
merged 5 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,6 @@
nargsort,
)

if TYPE_CHECKING:

class ExtensionArraySupportsAnyAll("ExtensionArray"):
def any(self, *, skipna: bool = True) -> bool:
pass

def all(self, *, skipna: bool = True) -> bool:
pass

from pandas._typing import (
NumpySorter,
NumpyValueArrayLike,
)
kostyafarber marked this conversation as resolved.
Show resolved Hide resolved


_extension_array_shared_docs: dict[str, str] = {}

ExtensionArrayT = TypeVar("ExtensionArrayT", bound="ExtensionArray")
Expand Down Expand Up @@ -532,6 +517,7 @@ def dtype(self) -> ExtensionDtype:

@property
def shape(self) -> Shape:

kostyafarber marked this conversation as resolved.
Show resolved Hide resolved
"""
Return a tuple of the array dimensions.
"""
Expand Down Expand Up @@ -1686,6 +1672,21 @@ def __array_ufunc__(self, ufunc: np.ufunc, method: str, *inputs, **kwargs):
return arraylike.default_array_ufunc(self, ufunc, method, *inputs, **kwargs)


if TYPE_CHECKING:

class ExtensionArraySupportsAnyAll(ExtensionArray):
def any(self, *, skipna: bool = True) -> bool:
pass

def all(self, *, skipna: bool = True) -> bool:
pass

from pandas._typing import (
NumpySorter,
NumpyValueArrayLike,
)


class ExtensionOpsMixin:
"""
A base class for linking the operators to their dunder names.
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ disable = [
"c-extension-no-member",
"function-redefined",
"import-error",
"inherit-non-class",
"invalid-repr-returned",
"invalid-unary-operand-type",
"misplaced-bare-raise",
Expand Down