Skip to content

Delete undocumented functions #1254

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 8 commits into from
Jun 20, 2025
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
5 changes: 0 additions & 5 deletions pandas-stubs/_libs/ops_dispatch.pyi

This file was deleted.

4 changes: 0 additions & 4 deletions pandas-stubs/_libs/tslibs/conversion.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
from datetime import datetime

def localize_pydatetime(dt: datetime, tz: object) -> datetime: ...

class OutOfBoundsTimedelta(ValueError): ...
4 changes: 0 additions & 4 deletions pandas-stubs/_libs/tslibs/parsing.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
from typing import Any

def parse_time_string(*args, **kwargs) -> Any: ...

class DateParseError(ValueError):
def __init__(self, *args, **kwargs) -> None: ...
3 changes: 0 additions & 3 deletions pandas-stubs/_libs/tslibs/strptime.pyi

This file was deleted.

2 changes: 0 additions & 2 deletions pandas-stubs/_version.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ from typing import Literal

version_json: str = ...

def get_versions(): ...

_stub_version: Literal["2.2.3.250527"]
1 change: 0 additions & 1 deletion pandas-stubs/api/types/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ from pandas._libs.lib import infer_dtype as infer_dtype

from pandas.core.dtypes.api import (
is_any_real_numeric_dtype as is_any_real_numeric_dtype,
is_array_like as is_array_like,
is_bool as is_bool,
is_bool_dtype as is_bool_dtype,
is_complex as is_complex,
Expand Down
4 changes: 0 additions & 4 deletions pandas-stubs/core/arraylike.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ from typing import Any

from typing_extensions import Self

from pandas._libs.ops_dispatch import (
maybe_dispatch_ufunc_to_dunder_op as maybe_dispatch_ufunc_to_dunder_op,
)

class OpsMixin:
def __eq__(self, other: object) -> Self: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
def __ne__(self, other: object) -> Self: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
Expand Down
22 changes: 11 additions & 11 deletions pandas-stubs/core/arrays/arrow/dtype.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pyarrow as pa

from pandas._libs.missing import NAType

from pandas.core.dtypes.base import StorageExtensionDtype

class ArrowDtype(StorageExtensionDtype):
pyarrow_dtype: pa.DataType
def __init__(self, pyarrow_dtype: pa.DataType) -> None: ...
@property
def na_value(self) -> NAType: ...
import pyarrow as pa

from pandas._libs.missing import NAType

from pandas.core.dtypes.base import StorageExtensionDtype

class ArrowDtype(StorageExtensionDtype):
pyarrow_dtype: pa.DataType
def __init__(self, pyarrow_dtype: pa.DataType) -> None: ...
@property
def na_value(self) -> NAType: ...
2 changes: 0 additions & 2 deletions pandas-stubs/core/arrays/boolean.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class BooleanDtype(ExtensionDtype):
@classmethod
def construct_array_type(cls) -> type_t[BooleanArray]: ...

def coerce_to_array(values, mask=..., copy: bool = ...): ...

class BooleanArray(BaseMaskedArray):
def __init__(
self, values: np.ndarray, mask: np.ndarray, copy: bool = ...
Expand Down
3 changes: 0 additions & 3 deletions pandas-stubs/core/arrays/categorical.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,3 @@ class CategoricalAccessor(PandasDelegate, NoNewAttributesMixin):
) -> Series: ...
def as_ordered(self) -> Series: ...
def as_unordered(self) -> Series: ...

def factorize_from_iterable(values): ...
def factorize_from_iterables(iterables): ...
2 changes: 0 additions & 2 deletions pandas-stubs/core/arrays/datetimelike.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,3 @@ class DatetimeLikeArrayMixin(ExtensionOpsMixin, ExtensionArray):
def min(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def max(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def mean(self, *, skipna: bool = ...): ...

def maybe_infer_freq(freq): ...
4 changes: 0 additions & 4 deletions pandas-stubs/core/arrays/datetimes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ from pandas._typing import (

from pandas.core.dtypes.dtypes import DatetimeTZDtype as DatetimeTZDtype

def tz_to_dtype(tz): ...

class DatetimeArray(DatetimeLikeArrayMixin, TimelikeOps, DatelikeOps):
__array_priority__: int = ...
def __init__(self, values, dtype=..., freq=..., copy: bool = ...) -> None: ...
Expand Down Expand Up @@ -85,5 +83,3 @@ def objects_to_datetime64ns(
require_iso8601: bool = ...,
allow_object: bool = ...,
): ...
def maybe_convert_dtype(data, copy): ...
def validate_tz_from_dtype(dtype, tz): ...
4 changes: 0 additions & 4 deletions pandas-stubs/core/arrays/timedeltas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,3 @@ class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
nanoseconds: int = ...
@property
def components(self) -> int: ...

def sequence_to_td64ns(data, copy: bool = ..., unit: str = ..., errors: str = ...): ...
def ints_to_td64ns(data, unit: str = ...): ...
def objects_to_td64ns(data, unit: str = ..., errors: str = ...): ...
30 changes: 0 additions & 30 deletions pandas-stubs/core/common.pyi

This file was deleted.

2 changes: 0 additions & 2 deletions pandas-stubs/core/computation/align.pyi

This file was deleted.

1 change: 0 additions & 1 deletion pandas-stubs/core/computation/common.pyi

This file was deleted.

11 changes: 0 additions & 11 deletions pandas-stubs/core/computation/expr.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import ast
from pandas.core.computation.ops import Term as Term
from pandas.core.computation.scope import Scope as Scope

intersection = ...

def disallow(nodes): ...
def add_ops(op_classes): ...

class BaseExprVisitor(ast.NodeVisitor):
const_type = ...
term_type = ...
Expand Down Expand Up @@ -46,12 +41,6 @@ class BaseExprVisitor(ast.NodeVisitor):
def visit_Compare(self, node, **kwargs): ...
def visit_BoolOp(self, node, **kwargs): ...

class PandasExprVisitor(BaseExprVisitor):
def __init__(self, env, engine, parser, preparser=...) -> None: ...

class PythonExprVisitor(BaseExprVisitor):
def __init__(self, env, engine, parser, preparser=...) -> None: ...

class Expr:
env: Scope
engine: str
Expand Down
6 changes: 0 additions & 6 deletions pandas-stubs/core/computation/expressions.pyi

This file was deleted.

2 changes: 0 additions & 2 deletions pandas-stubs/core/computation/ops.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class Op:
@property
def is_datetime(self) -> bool: ...

def is_term(obj) -> bool: ...

class BinOp(Op):
lhs = ...
rhs = ...
Expand Down
12 changes: 0 additions & 12 deletions pandas-stubs/core/computation/parsing.pyi

This file was deleted.

2 changes: 0 additions & 2 deletions pandas-stubs/core/computation/pytables.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,3 @@ class TermValue:
kind = ...
def __init__(self, value, converted, kind: str) -> None: ...
def tostring(self, encoding) -> str: ...

def maybe_expression(s) -> bool: ...
4 changes: 0 additions & 4 deletions pandas-stubs/core/computation/scope.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
def ensure_scope(
level: int, global_dict=..., local_dict=..., resolvers=..., target=..., **kwargs
) -> Scope: ...

class Scope:
level = ...
scope = ...
Expand Down
13 changes: 0 additions & 13 deletions pandas-stubs/core/config_init.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ from typing import Literal

use_bottleneck_doc: str = ...

def use_bottleneck_cb(key) -> None: ...

use_numexpr_doc: str = ...

def use_numexpr_cb(key) -> None: ...

pc_precision_doc: str = ...
pc_colspace_doc: str = ...
pc_max_rows_doc: str = ...
Expand Down Expand Up @@ -41,24 +37,15 @@ pc_latex_multicolumn: str = ...
pc_latex_multicolumn_format: str = ...
pc_latex_multirow: str = ...

def table_schema_cb(key) -> None: ...
def is_terminal() -> bool: ...

max_cols: int = ...
tc_sim_interactive_doc: str = ...
use_inf_as_null_doc: str = ...
use_inf_as_na_doc: str = ...

def use_inf_as_na_cb(key) -> None: ...

chained_assignment: Literal["warn", "raise"] | None
reader_engine_doc: str = ...
writer_engine_doc: str = ...
parquet_engine_doc: str = ...
plotting_backend_doc: str = ...

def register_plotting_backend_cb(key) -> None: ...

register_converter_doc: str = ...

def register_converter_cb(key) -> None: ...
5 changes: 0 additions & 5 deletions pandas-stubs/core/construction.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ def array(
dtype: str | np.dtype | ExtensionDtype | None = ...,
copy: bool = ...,
) -> ExtensionArray: ...
def extract_array(obj, extract_numpy: bool = ...): ...
def sanitize_array(
data, index, dtype=..., copy: bool = ..., raise_cast_failure: bool = ...
): ...
def is_empty_data(data) -> bool: ...
1 change: 0 additions & 1 deletion pandas-stubs/core/dtypes/api.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pandas.core.dtypes.common import (
is_any_real_numeric_dtype as is_any_real_numeric_dtype,
is_array_like as is_array_like,
is_bool as is_bool,
is_bool_dtype as is_bool_dtype,
is_complex as is_complex,
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/dtypes/common.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ from pandas._typing import (
)

from pandas.core.dtypes.inference import (
is_array_like as is_array_like,
is_bool as is_bool,
is_complex as is_complex,
is_dict_like as is_dict_like,
Expand Down
35 changes: 17 additions & 18 deletions pandas-stubs/core/dtypes/inference.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
from pandas._libs import lib

is_bool = lib.is_bool
is_integer = lib.is_integer
is_float = lib.is_float
is_complex = lib.is_complex
is_scalar = lib.is_scalar
is_list_like = lib.is_list_like
is_iterator = lib.is_iterator

def is_number(obj: object) -> bool: ...
def is_file_like(obj: object) -> bool: ...
def is_re(obj: object) -> bool: ...
def is_array_like(obj: object) -> bool: ...
def is_re_compilable(obj: object) -> bool: ...
def is_dict_like(obj: object) -> bool: ...
def is_named_tuple(obj: object) -> bool: ...
def is_hashable(obj: object) -> bool: ...
from pandas._libs import lib

is_bool = lib.is_bool
is_integer = lib.is_integer
is_float = lib.is_float
is_complex = lib.is_complex
is_scalar = lib.is_scalar
is_list_like = lib.is_list_like
is_iterator = lib.is_iterator

def is_number(obj: object) -> bool: ...
def is_file_like(obj: object) -> bool: ...
def is_re(obj: object) -> bool: ...
def is_re_compilable(obj: object) -> bool: ...
def is_dict_like(obj: object) -> bool: ...
def is_named_tuple(obj: object) -> bool: ...
def is_hashable(obj: object) -> bool: ...
8 changes: 0 additions & 8 deletions pandas-stubs/core/indexers.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import numpy as np

def is_list_like_indexer(key) -> bool: ...
def is_scalar_indexer(indexer, arr_value) -> bool: ...
def is_empty_indexer(indexer, arr_value: np.ndarray) -> bool: ...
def check_setitem_lengths(indexer, value, values) -> None: ...
def validate_indices(indices: np.ndarray, n: int) -> None: ...
def maybe_convert_indices(indices, n: int): ...
def length_of_indexer(indexer, target=...) -> int: ...
def deprecate_ndim_indexing(result) -> None: ...
def check_array_indexer(arrayArrayLike, indexer): ...

class BaseIndexer:
Expand Down
6 changes: 0 additions & 6 deletions pandas-stubs/core/indexes/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ from pandas.core.indexes.multi import MultiIndex as MultiIndex
from pandas.core.indexes.period import PeriodIndex as PeriodIndex
from pandas.core.indexes.range import RangeIndex as RangeIndex
from pandas.core.indexes.timedeltas import TimedeltaIndex as TimedeltaIndex

def get_objs_combined_axis(
objs, intersect: bool = ..., axis=..., sort: bool = ...
) -> Index: ...
def union_indexes(indexes, sort=...) -> Index: ...
def all_indexes_same(indexes): ...
7 changes: 0 additions & 7 deletions pandas-stubs/core/indexes/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ from pandas._typing import (
AnyAll,
AxesData,
DropKeep,
Dtype,
DtypeArg,
DtypeObj,
FillnaOptions,
Expand Down Expand Up @@ -475,9 +474,3 @@ class Index(IndexOpsMixin[S1]):
) -> Self: ...

UnknownIndex: TypeAlias = Index[Any]

def ensure_index_from_sequences(
sequences: Sequence[Sequence[Dtype]], names: list[_str] = ...
) -> Index: ...
def ensure_index(index_like: Sequence | Index, copy: bool = ...) -> Index: ...
def maybe_extract_name(name, obj, cls) -> Label: ...
2 changes: 0 additions & 2 deletions pandas-stubs/core/indexes/multi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,3 @@ class MultiIndex(Index):
def insert(self, loc, item): ...
def delete(self, loc): ...
def isin(self, values, level=...) -> np_ndarray_bool: ...

def maybe_droplevels(index, key): ...
10 changes: 0 additions & 10 deletions pandas-stubs/core/indexing.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import TypeVar

import numpy as np
from pandas.core.indexes.api import Index
from typing_extensions import TypeAlias

Expand Down Expand Up @@ -52,12 +51,3 @@ class _ScalarAccessIndexer(_NDFrameIndexerBase):

class _AtIndexer(_ScalarAccessIndexer): ...
class _iAtIndexer(_ScalarAccessIndexer): ...

def convert_to_index_sliceable(obj, key): ...
def check_bool_indexer(index: Index, key) -> np.ndarray: ...
def convert_missing_indexer(indexer): ...
def convert_from_missing_indexer_tuple(indexer, axes): ...
def maybe_convert_ix(*args): ...
def is_nested_tuple(tup, labels) -> bool: ...
def is_label_like(key) -> bool: ...
def need_slice(obj) -> bool: ...
8 changes: 0 additions & 8 deletions pandas-stubs/core/missing.pyi

This file was deleted.

Loading