diff --git a/pandas/_config/config.py b/pandas/_config/config.py index ebf2ba2510aa4..e970c5c00fe17 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -56,10 +56,8 @@ TYPE_CHECKING, Any, Callable, - Literal, NamedTuple, cast, - overload, ) import warnings @@ -69,7 +67,6 @@ if TYPE_CHECKING: from collections.abc import ( Generator, - Iterable, Sequence, ) @@ -685,54 +682,6 @@ def _build_option_description(k: str) -> str: return s -@overload -def pp_options_list( - keys: Iterable[str], *, width: int = ..., _print: Literal[False] = ... -) -> str: ... - - -@overload -def pp_options_list( - keys: Iterable[str], *, width: int = ..., _print: Literal[True] -) -> None: ... - - -def pp_options_list( - keys: Iterable[str], *, width: int = 80, _print: bool = False -) -> str | None: - """Builds a concise listing of available options, grouped by prefix""" - from itertools import groupby - from textwrap import wrap - - def pp(name: str, ks: Iterable[str]) -> list[str]: - pfx = "- " + name + ".[" if name else "" - ls = wrap( - ", ".join(ks), - width, - initial_indent=pfx, - subsequent_indent=" ", - break_long_words=False, - ) - if ls and ls[-1] and name: - ls[-1] = ls[-1] + "]" - return ls - - ls: list[str] = [] - singles = [x for x in sorted(keys) if x.find(".") < 0] - if singles: - ls += pp("", singles) - keys = [x for x in keys if x.find(".") >= 0] - - for k, g in groupby(sorted(keys), lambda x: x[: x.rfind(".")]): - ks = [x[len(k) + 1 :] for x in list(g)] - ls += pp(k, ks) - s = "\n".join(ls) - if _print: - print(s) - return s - - -# # helpers diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 6a03e6b1f5ab0..ef115e350462f 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -259,7 +259,6 @@ def _wrap_result( expand: bool | None = None, fill_value=np.nan, returns_string: bool = True, - returns_bool: bool = False, dtype=None, ): from pandas import ( diff --git a/pandas/io/parsers/readers.py b/pandas/io/parsers/readers.py index 9ce169c3fe880..6b139b0ad45c0 100644 --- a/pandas/io/parsers/readers.py +++ b/pandas/io/parsers/readers.py @@ -20,7 +20,6 @@ Callable, Generic, Literal, - NamedTuple, TypedDict, overload, ) @@ -563,11 +562,6 @@ class _Fwf_Defaults(TypedDict): } -class _DeprecationConfig(NamedTuple): - default_value: Any - msg: str | None - - @overload def validate_integer(name: str, val: None, min_val: int = ...) -> None: ... diff --git a/pandas/io/xml.py b/pandas/io/xml.py index 377856eb204a6..a6cd06cd61687 100644 --- a/pandas/io/xml.py +++ b/pandas/io/xml.py @@ -172,7 +172,6 @@ def __init__( self.encoding = encoding self.stylesheet = stylesheet self.iterparse = iterparse - self.is_style = None self.compression: CompressionOptions = compression self.storage_options = storage_options