Skip to content

stubtest inconsistencies #313

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

Merged
merged 6 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion pandas-stubs/_libs/tslibs/timestamps.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Timestamp(datetime):
cls: type[_DatetimeT], t: float, tz: _tzinfo | None = ...
) -> _DatetimeT: ...
@classmethod
def utcfromtimestamp(cls: type[_DatetimeT], t: float) -> _DatetimeT: ...
def utcfromtimestamp(cls: type[_DatetimeT], ts: float) -> _DatetimeT: ...
@classmethod
def today(cls: type[_DatetimeT], tz: _tzinfo | str | None = ...) -> _DatetimeT: ...
@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pandas-stubs/core/arrays/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ExtensionArray:
) -> tuple[np.ndarray, ABCExtensionArray]: ...
def repeat(self, repeats, axis=...): ...
def take(
self, indices: Sequence[int], allow_fill: bool = ..., fill_value=...
self, indices: Sequence[int], *, allow_fill: bool = ..., fill_value=...
) -> ABCExtensionArray: ...
def copy(self) -> ABCExtensionArray: ...
def view(self, dtype=...) -> ABCExtensionArray | np.ndarray: ...
Expand Down
2 changes: 1 addition & 1 deletion pandas-stubs/core/arrays/interval.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class IntervalArray(IntervalMixin, ExtensionArray):
self, periods: int = ..., fill_value: object = ...
) -> ABCExtensionArray: ...
def take(
self, indices, allow_fill: bool = ..., fill_value=..., axis=..., **kwargs
self, indices, *, allow_fill: bool = ..., fill_value=..., axis=..., **kwargs
): ...
def value_counts(self, dropna: bool = ...): ...
@property
Expand Down
96 changes: 0 additions & 96 deletions pandas-stubs/core/arrays/numpy_.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ from pandas.core.arrays.base import (
ExtensionOpsMixin,
)

from pandas._typing import (
Scalar,
npt,
)

from pandas.core.dtypes.dtypes import ExtensionDtype

class PandasDtype(ExtensionDtype):
Expand All @@ -30,95 +25,4 @@ class PandasDtype(ExtensionDtype):
def itemsize(self): ...

class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
__array_priority__: int = ...
def __init__(self, values: np.ndarray | PandasArray, copy: bool = ...) -> None: ...
@property
def dtype(self): ...
def __array__(self, dtype=...) -> np.ndarray: ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __getitem__(self, item): ...
def __setitem__(self, key, value) -> None: ...
def __len__(self) -> int: ...
@property
def nbytes(self) -> int: ...
def isna(self): ...
def fillna(self, value=..., method=..., limit=...): ...
def take(self, indices, allow_fill: bool = ..., fill_value=...): ...
def copy(self): ...
def unique(self): ...
def any(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
def all(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
def min(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
def max(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
def sum(
self,
axis=...,
dtype=...,
out=...,
keepdims: bool = ...,
initial=...,
skipna: bool = ...,
min_count: int = ...,
): ...
def prod(
self,
axis=...,
dtype=...,
out=...,
keepdims: bool = ...,
initial=...,
skipna: bool = ...,
min_count: int = ...,
): ...
def mean(
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
): ...
def median(
self,
axis=...,
out=...,
overwrite_input: bool = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def std(
self,
axis=...,
dtype=...,
out=...,
ddof: int = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def var(
self,
axis=...,
dtype=...,
out=...,
ddof: int = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def sem(
self,
axis=...,
dtype=...,
out=...,
ddof: int = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def kurt(
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
): ...
def skew(
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
): ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
copy: bool = ...,
na_value: Scalar = ...,
) -> np.ndarray: ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
def __invert__(self): ...
4 changes: 2 additions & 2 deletions pandas-stubs/core/arrays/string_.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from pandas.core.arrays import PandasArray as PandasArray
from pandas.core.arrays import PandasArray

from pandas._typing import type_t

from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
from pandas.core.dtypes.base import ExtensionDtype

class StringDtype(ExtensionDtype):
name: str = ...
Expand Down
3 changes: 3 additions & 0 deletions pandas-stubs/core/arrays/timedeltas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
def astype(self, dtype, copy: bool = ...): ...
def sum(
self,
*,
axis=...,
dtype=...,
out=...,
Expand All @@ -24,6 +25,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
): ...
def std(
self,
*,
axis=...,
dtype=...,
out=...,
Expand All @@ -33,6 +35,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
): ...
def median(
self,
*,
axis=...,
out=...,
overwrite_input: bool = ...,
Expand Down
1 change: 1 addition & 0 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,7 @@ class DataFrame(NDFrame, OpsMixin):
min_periods: int | None = ...,
center: _bool = ...,
*,
win_type: None = ...,
on: Hashable | None = ...,
axis: AxisType = ...,
closed: IntervalClosedType | None = ...,
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/indexes/timedeltas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class TimedeltaIndex(DatetimeTimedeltaMixin, TimedeltaIndexProperties):
def get_value(self, series, key): ...
def get_loc(self, key, tolerance=...): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
def is_type_compatible(self, typ) -> bool: ...
@property
def inferred_type(self) -> str: ...
def insert(self, loc, item): ...
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/missing.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
def mask_missing(arr, values_to_mask): ...
def clean_fill_method(method, allow_nearest: bool = ...): ...
def clean_interp_method(method, **kwargs): ...
def find_valid_index(values, how: str): ...
def interpolate_2d(
values, method: str = ..., axis: int = ..., limit=..., fill_value=..., dtype=...
): ...
Expand Down
2 changes: 1 addition & 1 deletion pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
self,
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
*,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
Expand Down Expand Up @@ -1528,6 +1527,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
min_periods: int | None = ...,
center: _bool = ...,
*,
win_type: None = ...,
on: _str | None = ...,
axis: SeriesAxisType = ...,
closed: _str | None = ...,
Expand Down
21 changes: 0 additions & 21 deletions pandas-stubs/util/_test_decorators.pyi

This file was deleted.