Skip to content
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
10 changes: 6 additions & 4 deletions pandas-stubs/_libs/json.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
def decode(*args, **kwargs): ...
def dumps(*args, **kwargs): ...
def encode(*args, **kwargs): ...
def loads(*args, **kwargs): ...
from typing import Any

def decode(*args: Any, **kwargs: Any): ...
def dumps(*args: Any, **kwargs: Any): ...
def encode(*args: Any, **kwargs: Any): ...
def loads(*args: Any, **kwargs: Any): ...
4 changes: 3 additions & 1 deletion pandas-stubs/_libs/tslibs/parsing.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from typing import Any

class DateParseError(ValueError):
def __init__(self, *args, **kwargs) -> None: ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
5 changes: 3 additions & 2 deletions pandas-stubs/_testing/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from collections.abc import (
)
from contextlib import contextmanager
from typing import (
Any,
Literal,
overload,
)
Expand Down Expand Up @@ -38,7 +39,7 @@ def assert_almost_equal(
check_dtype: bool | Literal["equiv"] = "equiv",
rtol: float = 1e-5,
atol: float = 1e-8,
**kwargs,
**kwargs: Any,
) -> None: ...
def assert_dict_equal(left: dict, right: dict, compare_keys: bool = True) -> None: ...
def assert_index_equal(
Expand Down Expand Up @@ -172,7 +173,7 @@ def assert_frame_equal(
atol: float = 1e-8,
obj: str = "DataFrame",
) -> None: ...
def assert_equal(left, right, **kwargs) -> None: ...
def assert_equal(left, right, **kwargs: Any) -> None: ...
def assert_sp_array_equal(left: SparseArray, right: SparseArray) -> None: ...
def assert_contains_all(iterable: Iterable[T], dic: Container[T]) -> None: ...
def assert_copy(iter1: Iterable[T], iter2: Iterable[T], **eql_kwargs) -> None: ...
Expand Down
6 changes: 3 additions & 3 deletions pandas-stubs/core/arrays/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ExtensionArray:
def astype(self, dtype, copy: bool = True): ...
def isna(self) -> ArrayLike: ...
def argsort(
self, *, ascending: bool = ..., kind: str = ..., **kwargs
self, *, ascending: bool = ..., kind: str = ..., **kwargs: Any
) -> np_1darray: ...
def fillna(self, value=..., method=None, limit=None): ...
def dropna(self): ...
Expand All @@ -67,14 +67,14 @@ class ExtensionArray:
def ravel(self, order="C") -> Self: ...
def tolist(self) -> list: ...
def _reduce(
self, name: str, *, skipna: bool = ..., keepdims: bool = ..., **kwargs
self, name: str, *, skipna: bool = ..., keepdims: bool = ..., **kwargs: Any
) -> object: ...
def _accumulate(
self,
name: Literal["cummin", "cummax", "cumsum", "cumprod"],
*,
skipna: bool = True,
**kwargs,
**kwargs: Any,
) -> Self: ...

class ExtensionOpsMixin:
Expand Down
8 changes: 5 additions & 3 deletions pandas-stubs/core/arrays/boolean.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

import numpy as np
from pandas.core.arrays.masked import BaseMaskedArray as BaseMaskedArray

Expand All @@ -18,8 +20,8 @@ class BooleanArray(BaseMaskedArray):
) -> None: ...
@property
def dtype(self): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs: Any): ...
def __setitem__(self, key, value) -> None: ...
def astype(self, dtype, copy: bool = True): ...
def any(self, *, skipna: bool = ..., **kwargs): ...
def all(self, *, skipna: bool = ..., **kwargs): ...
def any(self, *, skipna: bool = ..., **kwargs: Any): ...
def all(self, *, skipna: bool = ..., **kwargs: Any): ...
4 changes: 2 additions & 2 deletions pandas-stubs/core/arrays/categorical.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Categorical(ExtensionArray):
def shape(self): ...
def shift(self, periods=1, fill_value=...): ...
def __array__(self, dtype=...) -> np_1darray: ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs: Any): ...
@property
def T(self): ...
@property
Expand All @@ -103,7 +103,7 @@ class Categorical(ExtensionArray):
def dropna(self): ...
def value_counts(self, dropna: bool = True): ...
def check_for_ordered(self, op) -> None: ...
def argsort(self, *, ascending: bool = ..., kind: str = ..., **kwargs): ...
def argsort(self, *, ascending: bool = ..., kind: str = ..., **kwargs: Any): ...
def sort_values(
self, *, inplace: bool = ..., ascending: bool = ..., na_position: str = ...
): ...
Expand Down
11 changes: 6 additions & 5 deletions pandas-stubs/core/arrays/datetimelike.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections.abc import Sequence
from typing import (
Any,
TypeAlias,
overload,
)
Expand Down Expand Up @@ -58,8 +59,8 @@ class DatetimeLikeArrayMixin(ExtensionOpsMixin, ExtensionArray):
def ndim(self) -> int: ...
@property
def shape(self): ...
def reshape(self, *args, **kwargs): ...
def ravel(self, *args, **kwargs): ... # pyrefly: ignore
def reshape(self, *args: Any, **kwargs: Any): ...
def ravel(self, *args: Any, **kwargs: Any): ... # pyrefly: ignore
def __iter__(self): ...
@property
def asi8(self) -> np.ndarray: ...
Expand All @@ -84,7 +85,7 @@ class DatetimeLikeArrayMixin(ExtensionOpsMixin, ExtensionArray):
def unique(self): ...
def copy(self): ...
def shift(self, periods: int = 1, fill_value=..., axis: int = ...): ...
def repeat(self, repeats, *args, **kwargs): ... # pyrefly: ignore
def repeat(self, repeats, *args: Any, **kwargs: Any): ... # pyrefly: ignore
def value_counts(self, dropna: bool = True): ...
def map(self, mapper): ...
def isna(self): ...
Expand All @@ -108,6 +109,6 @@ class DatetimeLikeArrayMixin(ExtensionOpsMixin, ExtensionArray):
def __rsub__(self, other): ...
def __iadd__(self, other): ...
def __isub__(self, other): ...
def min(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def max(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def min(self, *, axis=..., skipna: bool = ..., **kwargs: Any): ...
def max(self, *, axis=..., skipna: bool = ..., **kwargs: Any): ...
def mean(self, *, skipna: bool = ...): ...
4 changes: 3 additions & 1 deletion pandas-stubs/core/arrays/integer.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

from pandas.core.arrays.masked import BaseMaskedArray

from pandas._libs.missing import NAType
Expand All @@ -17,7 +19,7 @@ class IntegerArray(BaseMaskedArray):
@property
def dtype(self) -> _IntegerDtype: ...
def __init__(self, values, mask, copy: bool = ...) -> None: ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs: Any): ...
def __setitem__(self, key, value) -> None: ...
def astype(self, dtype, copy: bool = True): ...

Expand Down
3 changes: 2 additions & 1 deletion pandas-stubs/core/arrays/interval.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import (
Any,
TypeAlias,
overload,
)
Expand Down Expand Up @@ -83,7 +84,7 @@ class IntervalArray(IntervalMixin, ExtensionArray):
allow_fill: bool = ...,
fill_value=...,
axis=...,
**kwargs,
**kwargs: Any,
) -> Self: ...
def value_counts(self, dropna: bool = True): ...
@property
Expand Down
4 changes: 3 additions & 1 deletion pandas-stubs/core/arrays/numpy_.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

import numpy as np
from numpy.lib.mixins import NDArrayOperatorsMixin
from pandas.core.arrays.base import (
Expand All @@ -14,4 +16,4 @@ class PandasDtype(ExtensionDtype):
def itemsize(self) -> int: ...

class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs: Any): ...
12 changes: 6 additions & 6 deletions pandas-stubs/core/arrays/sparse/array.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class SparseArray(ExtensionArray, ExtensionOpsMixin):
def map(self, mapper): ...
def to_dense(self): ...
def nonzero(self): ...
def all(self, axis=..., *args, **kwargs): ...
def any(self, axis: int = ..., *args, **kwargs): ...
def sum(self, axis: int = 0, *args, **kwargs): ...
def cumsum(self, axis: int = ..., *args, **kwargs): ...
def mean(self, axis: int = ..., *args, **kwargs): ...
def all(self, axis=..., *args: Any, **kwargs: Any): ...
def any(self, axis: int = ..., *args: Any, **kwargs: Any): ...
def sum(self, axis: int = 0, *args: Any, **kwargs: Any): ...
def cumsum(self, axis: int = ..., *args: Any, **kwargs: Any): ...
def mean(self, axis: int = ..., *args: Any, **kwargs: Any): ...
@property
def T(self): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs: Any): ...
def __abs__(self): ...
2 changes: 1 addition & 1 deletion pandas-stubs/core/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SelectionMixin(Generic[NDFrameT]):
@cache_readonly
def ndim(self) -> int: ...
def __getitem__(self, key): ...
def aggregate(self, func, *args, **kwargs): ...
def aggregate(self, func, *args: Any, **kwargs: Any): ...

class IndexOpsMixin(OpsMixin, Generic[S1, GenericT_co]):
__array_priority__: int = ...
Expand Down
41 changes: 21 additions & 20 deletions pandas-stubs/core/computation/expr.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ast
from typing import Any

from pandas.core.computation.ops import Term as Term
from pandas.core.computation.scope import Scope as Scope
Expand All @@ -19,27 +20,27 @@ class BaseExprVisitor(ast.NodeVisitor):
preparser = ...
assigner = ...
def __init__(self, env, engine, parser, preparser=...) -> None: ...
def visit(self, node, **kwargs): ...
def visit_Module(self, node, **kwargs): ...
def visit_Expr(self, node, **kwargs): ...
def visit_BinOp(self, node, **kwargs): ...
def visit_Div(self, node, **kwargs): ...
def visit_UnaryOp(self, node, **kwargs): ...
def visit_Name(self, node, **kwargs): ...
def visit_NameConstant(self, node, **kwargs): ...
def visit_Num(self, node, **kwargs): ...
def visit_Constant(self, node, **kwargs): ...
def visit_Str(self, node, **kwargs): ...
def visit_List(self, node, **kwargs): ...
def visit_Index(self, node, **kwargs): ...
def visit_Subscript(self, node, **kwargs): ...
def visit_Slice(self, node, **kwargs): ...
def visit_Assign(self, node, **kwargs): ...
def visit_Attribute(self, node, **kwargs): ...
def visit_Call(self, node, side=..., **kwargs): ...
def visit(self, node, **kwargs: Any): ...
def visit_Module(self, node, **kwargs: Any): ...
def visit_Expr(self, node, **kwargs: Any): ...
def visit_BinOp(self, node, **kwargs: Any): ...
def visit_Div(self, node, **kwargs: Any): ...
def visit_UnaryOp(self, node, **kwargs: Any): ...
def visit_Name(self, node, **kwargs: Any): ...
def visit_NameConstant(self, node, **kwargs: Any): ...
def visit_Num(self, node, **kwargs: Any): ...
def visit_Constant(self, node, **kwargs: Any): ...
def visit_Str(self, node, **kwargs: Any): ...
def visit_List(self, node, **kwargs: Any): ...
def visit_Index(self, node, **kwargs: Any): ...
def visit_Subscript(self, node, **kwargs: Any): ...
def visit_Slice(self, node, **kwargs: Any): ...
def visit_Assign(self, node, **kwargs: Any): ...
def visit_Attribute(self, node, **kwargs: Any): ...
def visit_Call(self, node, side=..., **kwargs: Any): ...
def translate_In(self, op): ...
def visit_Compare(self, node, **kwargs): ...
def visit_BoolOp(self, node, **kwargs): ...
def visit_Compare(self, node, **kwargs: Any): ...
def visit_BoolOp(self, node, **kwargs: Any): ...

class Expr:
env: Scope
Expand Down
14 changes: 8 additions & 6 deletions pandas-stubs/core/computation/ops.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

import numpy as np

class UndefinedVariableError(NameError):
Expand All @@ -12,8 +14,8 @@ class Term:
def __init__(self, name, env, side=..., encoding=...) -> None: ...
@property
def local_name(self) -> str: ...
def __call__(self, *args, **kwargs): ...
def evaluate(self, *args, **kwargs): ...
def __call__(self, *args: Any, **kwargs: Any): ...
def evaluate(self, *args: Any, **kwargs: Any): ...
def update(self, value) -> None: ...
@property
def is_scalar(self) -> bool: ...
Expand Down Expand Up @@ -41,7 +43,7 @@ class Op:
op: str
operands = ...
encoding = ...
def __init__(self, op: str, operands, *args, **kwargs) -> None: ...
def __init__(self, op: str, operands, *args: Any, **kwargs: Any) -> None: ...
def __iter__(self): ...
@property
def return_type(self): ...
Expand All @@ -58,15 +60,15 @@ class BinOp(Op):
lhs = ...
rhs = ...
func = ...
def __init__(self, op: str, lhs, rhs, **kwargs) -> None: ...
def __init__(self, op: str, lhs, rhs, **kwargs: Any) -> None: ...
def __call__(self, env): ...
def evaluate(self, env, engine: str, parser, term_type, eval_in_python): ...
def convert_values(self): ...

def isnumeric(dtype) -> bool: ...

class Div(BinOp):
def __init__(self, lhs, rhs, **kwargs) -> None: ...
def __init__(self, lhs, rhs, **kwargs: Any) -> None: ...

class UnaryOp(Op):
operand = ...
Expand All @@ -85,4 +87,4 @@ class FuncNode:
name = ...
func = ...
def __init__(self, name: str) -> None: ...
def __call__(self, *args): ...
def __call__(self, *args: Any): ...
12 changes: 6 additions & 6 deletions pandas-stubs/core/computation/pytables.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ class UnaryOp(ops.UnaryOp):
class PyTablesExprVisitor(BaseExprVisitor):
const_type = ...
term_type = ...
def __init__(self, env, engine, parser, **kwargs) -> None: ...
def visit_UnaryOp(self, node, **kwargs): ...
def visit_Index(self, node, **kwargs): ...
def visit_Assign(self, node, **kwargs): ...
def visit_Subscript(self, node, **kwargs): ...
def visit_Attribute(self, node, **kwargs): ...
def __init__(self, env, engine, parser, **kwargs: Any) -> None: ...
def visit_UnaryOp(self, node, **kwargs: Any): ...
def visit_Index(self, node, **kwargs: Any): ...
def visit_Assign(self, node, **kwargs: Any): ...
def visit_Subscript(self, node, **kwargs: Any): ...
def visit_Attribute(self, node, **kwargs: Any): ...
def translate_In(self, op): ...

class PyTablesExpr(expr.Expr):
Expand Down
2 changes: 1 addition & 1 deletion pandas-stubs/core/generic.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class NDFrame(indexing.IndexingMixin):
**kwargs: Any,
) -> T: ...
@final
def __finalize__(self, other, method=..., **kwargs) -> Self: ...
def __finalize__(self, other, method=..., **kwargs: Any) -> Self: ...
@final
def __setattr__(self, name: _str, value) -> None: ...
@final
Expand Down
Loading