Skip to content

Commit f730f5c

Browse files
author
Kevin Sheppard
committed
Merge remote-tracking branch 'upstream/main' into scalars-interval
2 parents 794a577 + 8333a14 commit f730f5c

File tree

19 files changed

+184
-19
lines changed

19 files changed

+184
-19
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
hooks:
1212
- id: isort
1313
- repo: https://github.com/asottile/pyupgrade
14-
rev: v2.37.3
14+
rev: v3.2.0
1515
hooks:
1616
- id: pyupgrade
1717
types_or: [python, pyi]
@@ -27,7 +27,7 @@ repos:
2727
- id: flake8
2828
name: flake8 (pyi)
2929
additional_dependencies:
30-
- flake8-pyi==22.8.2
30+
- flake8-pyi==22.10.0
3131
types: [pyi]
3232
args: [
3333
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 W503 Y019 Y027 Y034 Y037 Y041 Y042,

pandas-stubs/_testing/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def assert_series_equal(
7474
obj: str = ...,
7575
*,
7676
check_index: Literal[False],
77-
check_like: Literal[False],
77+
check_like: Literal[False] = ...,
7878
) -> None: ...
7979
@overload
8080
def assert_series_equal(

pandas-stubs/core/base.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class IndexOpsMixin:
6363
def tolist(self) -> list: ...
6464
def to_list(self) -> list: ...
6565
def __iter__(self): ...
66+
@property
6667
def hasnans(self) -> bool: ...
6768
def value_counts(
6869
self,

pandas-stubs/core/frame.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,8 +1276,6 @@ class DataFrame(NDFrame, OpsMixin):
12761276
@property
12771277
def at(self): ... # Not sure what to do with this yet; look at source
12781278
@property
1279-
def bool(self) -> _bool: ...
1280-
@property
12811279
def columns(self) -> Index: ...
12821280
@columns.setter # setter needs to be right next to getter; otherwise mypy complains
12831281
def columns(
@@ -1359,7 +1357,7 @@ class DataFrame(NDFrame, OpsMixin):
13591357
) -> DataFrame: ...
13601358
def astype(
13611359
self,
1362-
dtype: _str | Dtype | dict[_str, _str | Dtype],
1360+
dtype: _str | Dtype | dict[_str, _str | Dtype] | Series,
13631361
copy: _bool = ...,
13641362
errors: _str = ...,
13651363
) -> DataFrame: ...

pandas-stubs/core/generic.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ from typing import (
88
Literal,
99
Mapping,
1010
Sequence,
11+
final,
1112
overload,
1213
)
1314

@@ -83,6 +84,7 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
8384
def __neg__(self: NDFrameT) -> NDFrameT: ...
8485
def __pos__(self: NDFrameT) -> NDFrameT: ...
8586
def __nonzero__(self) -> None: ...
87+
@final
8688
def bool(self) -> _bool: ...
8789
def __abs__(self) -> NDFrame: ...
8890
def __round__(self, decimals: int = ...) -> NDFrame: ...

pandas-stubs/core/groupby/ops.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class BinGrouper(BaseGrouper):
7070
def get_iterator(self, data: DataFrame | Series, axis: int = ...): ...
7171
def indices(self): ...
7272
def group_info(self): ...
73+
@property
7374
def reconstructed_codes(self) -> list[np.ndarray]: ...
7475
def result_index(self): ...
7576
@property

pandas-stubs/core/indexes/base.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class Index(IndexOpsMixin, PandasObject):
112112
def is_monotonic_increasing(self) -> bool: ...
113113
@property
114114
def is_monotonic_decreasing(self) -> bool: ...
115+
@property
115116
def is_unique(self) -> bool: ...
116117
@property
117118
def has_duplicates(self) -> bool: ...
@@ -124,9 +125,10 @@ class Index(IndexOpsMixin, PandasObject):
124125
def is_interval(self) -> bool: ...
125126
def is_mixed(self) -> bool: ...
126127
def holds_integer(self): ...
128+
@property
127129
def inferred_type(self): ...
128-
def is_all_dates(self) -> bool: ...
129130
def __reduce__(self): ...
131+
@property
130132
def hasnans(self) -> bool: ...
131133
def isna(self): ...
132134
isnull = ...
@@ -177,6 +179,7 @@ class Index(IndexOpsMixin, PandasObject):
177179
): ...
178180
@property
179181
def values(self) -> np.ndarray: ...
182+
@property
180183
def array(self) -> ExtensionArray: ...
181184
def memory_usage(self, deep: bool = ...): ...
182185
def where(self, cond, other=...): ...

pandas-stubs/core/indexes/category.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CategoricalIndex(ExtensionIndex, accessor.PandasDelegate):
2828
def __array__(self, dtype=...) -> np.ndarray: ...
2929
def astype(self, dtype: DtypeArg, copy: bool = ...) -> Index: ...
3030
def fillna(self, value=..., downcast=...): ...
31+
@property
3132
def is_unique(self) -> bool: ...
3233
@property
3334
def is_monotonic_increasing(self) -> bool: ...

pandas-stubs/core/indexes/multi.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ class MultiIndex(Index):
6565
def __array__(self, dtype=...) -> np.ndarray: ...
6666
def view(self, cls=...): ...
6767
def __contains__(self, key) -> bool: ...
68+
@property
6869
def dtype(self) -> np.dtype: ...
6970
def memory_usage(self, deep: bool = ...) -> int: ...
71+
@property
7072
def nbytes(self) -> int: ...
7173
def format(
7274
self,
@@ -82,7 +84,9 @@ class MultiIndex(Index):
8284
def inferred_type(self) -> str: ...
8385
@property
8486
def values(self): ...
87+
@property
8588
def is_monotonic_increasing(self) -> bool: ...
89+
@property
8690
def is_monotonic_decreasing(self) -> bool: ...
8791
def duplicated(self, keep: Literal["first", "last", False] = ...): ...
8892
def fillna(self, value=..., downcast=...) -> None: ...

pandas-stubs/core/indexes/numeric.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ class Float64Index(NumericIndex):
3737
def equals(self, other) -> bool: ...
3838
def __contains__(self, other) -> bool: ...
3939
def get_loc(self, key, tolerance=...): ...
40+
@property
4041
def is_unique(self) -> bool: ...
4142
def isin(self, values, level=...): ...

0 commit comments

Comments
 (0)