Skip to content

Commit 43fdc06

Browse files
committed
fix some keyword-only arguments
1 parent 6827c7d commit 43fdc06

File tree

10 files changed

+25
-17
lines changed

10 files changed

+25
-17
lines changed

pandas-stubs/core/arrays/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ExtensionArray:
4747
) -> tuple[np.ndarray, ABCExtensionArray]: ...
4848
def repeat(self, repeats, axis=...): ...
4949
def take(
50-
self, indices: Sequence[int], allow_fill: bool = ..., fill_value=...
50+
self, indices: Sequence[int], *, allow_fill: bool = ..., fill_value=...
5151
) -> ABCExtensionArray: ...
5252
def copy(self) -> ABCExtensionArray: ...
5353
def view(self, dtype=...) -> ABCExtensionArray | np.ndarray: ...

pandas-stubs/core/arrays/interval.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class IntervalArray(IntervalMixin, ExtensionArray):
4444
self, periods: int = ..., fill_value: object = ...
4545
) -> ABCExtensionArray: ...
4646
def take(
47-
self, indices, allow_fill: bool = ..., fill_value=..., axis=..., **kwargs
47+
self, indices, *, allow_fill: bool = ..., fill_value=..., axis=..., **kwargs
4848
): ...
4949
def value_counts(self, dropna: bool = ...): ...
5050
@property

pandas-stubs/core/arrays/numpy_.pyi

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
4646
def take(self, indices, allow_fill: bool = ..., fill_value=...): ...
4747
def copy(self): ...
4848
def unique(self): ...
49-
def any(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
50-
def all(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
51-
def min(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
52-
def max(self, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
49+
def any(self, *, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
50+
def all(self, *, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
51+
def min(self, *, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
52+
def max(self, *, axis=..., out=..., keepdims: bool = ..., skipna: bool = ...): ...
5353
def sum(
5454
self,
55+
*,
5556
axis=...,
5657
dtype=...,
5758
out=...,
@@ -62,6 +63,7 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
6263
): ...
6364
def prod(
6465
self,
66+
*,
6567
axis=...,
6668
dtype=...,
6769
out=...,
@@ -71,10 +73,11 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
7173
min_count: int = ...,
7274
): ...
7375
def mean(
74-
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
76+
self, *, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
7577
): ...
7678
def median(
7779
self,
80+
*,
7881
axis=...,
7982
out=...,
8083
overwrite_input: bool = ...,
@@ -83,6 +86,7 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
8386
): ...
8487
def std(
8588
self,
89+
*,
8690
axis=...,
8791
dtype=...,
8892
out=...,
@@ -92,6 +96,7 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
9296
): ...
9397
def var(
9498
self,
99+
*,
95100
axis=...,
96101
dtype=...,
97102
out=...,
@@ -101,6 +106,7 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
101106
): ...
102107
def sem(
103108
self,
109+
*,
104110
axis=...,
105111
dtype=...,
106112
out=...,
@@ -109,10 +115,10 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
109115
skipna: bool = ...,
110116
): ...
111117
def kurt(
112-
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
118+
self, *, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
113119
): ...
114120
def skew(
115-
self, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
121+
self, *, axis=..., dtype=..., out=..., keepdims: bool = ..., skipna: bool = ...
116122
): ...
117123
def to_numpy(
118124
self,

pandas-stubs/core/arrays/string_.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from pandas.core.arrays import PandasArray as PandasArray
1+
from pandas.core.arrays import PandasArray
22

33
from pandas._typing import type_t
44

5-
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
5+
from pandas.core.dtypes.base import ExtensionDtype
66

77
class StringDtype(ExtensionDtype):
88
name: str = ...

pandas-stubs/core/arrays/timedeltas.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
1414
def astype(self, dtype, copy: bool = ...): ...
1515
def sum(
1616
self,
17+
*,
1718
axis=...,
1819
dtype=...,
1920
out=...,
@@ -24,6 +25,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
2425
): ...
2526
def std(
2627
self,
28+
*,
2729
axis=...,
2830
dtype=...,
2931
out=...,
@@ -33,6 +35,7 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
3335
): ...
3436
def median(
3537
self,
38+
*,
3639
axis=...,
3740
out=...,
3841
overwrite_input: bool = ...,

pandas-stubs/core/frame.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ class DataFrame(NDFrame, OpsMixin):
17871787
min_periods: int | None = ...,
17881788
center: _bool = ...,
17891789
*,
1790+
win_type: None = ...,
17901791
on: Hashable | None = ...,
17911792
axis: AxisType = ...,
17921793
closed: IntervalClosedType | None = ...,

pandas-stubs/core/indexes/timedeltas.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TimedeltaIndex(DatetimeTimedeltaMixin, TimedeltaIndexProperties):
3434
def __truediv__(self, other: num) -> TimedeltaIndex: ... # type: ignore[override]
3535
def astype(self, dtype, copy: bool = ...): ...
3636
def get_value(self, series, key): ...
37-
def get_loc(self, key, method=..., tolerance=...): ...
37+
def get_loc(self, key, tolerance=...): ...
3838
def searchsorted(self, value, side: str = ..., sorter=...): ...
3939
def is_type_compatible(self, kind: str) -> bool: ...
4040
@property

pandas-stubs/core/missing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def mask_missing(arr, values_to_mask): ...
22
def clean_fill_method(method, allow_nearest: bool = ...): ...
33
def clean_interp_method(method, **kwargs): ...
4-
def find_valid_index(values, how: str): ...
4+
def find_valid_index(values, how: str = ...): ...
55
def interpolate_2d(
66
values, method: str = ..., axis: int = ..., limit=..., fill_value=..., dtype=...
77
): ...

pandas-stubs/core/series.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
13911391
self,
13921392
axis: SeriesAxisType | None = ...,
13931393
skipna: _bool = ...,
1394-
*,
13951394
level: None = ...,
13961395
numeric_only: _bool | None = ...,
13971396
**kwargs,
@@ -1528,6 +1527,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
15281527
min_periods: int | None = ...,
15291528
center: _bool = ...,
15301529
*,
1530+
win_type: None = ...,
15311531
on: _str | None = ...,
15321532
axis: SeriesAxisType = ...,
15331533
closed: _str | None = ...,

pandas-stubs/util/_test_decorators.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ skip_if_not_us_locale = ...
1313
skip_if_no_scipy = ...
1414
skip_if_no_ne = ...
1515

16-
def skip_if_np_lt(
17-
ver_str: str, reason: str | None = ..., *args, **kwds
18-
) -> Callable: ...
16+
def skip_if_np_lt(ver_str: str, *args, reason: str | None = ...) -> Callable: ...
1917
def parametrize_fixture_doc(*args): ...
2018
def check_file_leaks(func) -> Callable: ...
2119
def async_mark(): ...

0 commit comments

Comments
 (0)