Skip to content

Commit 34ec78b

Browse files
authored
CLN: Remove private unused code (#57842)
* CLN: Remove private unused code * Add back used code
1 parent 97b6f8e commit 34ec78b

File tree

4 files changed

+0
-59
lines changed

4 files changed

+0
-59
lines changed

pandas/_config/config.py

-51
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@
5656
TYPE_CHECKING,
5757
Any,
5858
Callable,
59-
Literal,
6059
NamedTuple,
6160
cast,
62-
overload,
6361
)
6462
import warnings
6563

@@ -69,7 +67,6 @@
6967
if TYPE_CHECKING:
7068
from collections.abc import (
7169
Generator,
72-
Iterable,
7370
Sequence,
7471
)
7572

@@ -679,54 +676,6 @@ def _build_option_description(k: str) -> str:
679676
return s
680677

681678

682-
@overload
683-
def pp_options_list(
684-
keys: Iterable[str], *, width: int = ..., _print: Literal[False] = ...
685-
) -> str: ...
686-
687-
688-
@overload
689-
def pp_options_list(
690-
keys: Iterable[str], *, width: int = ..., _print: Literal[True]
691-
) -> None: ...
692-
693-
694-
def pp_options_list(
695-
keys: Iterable[str], *, width: int = 80, _print: bool = False
696-
) -> str | None:
697-
"""Builds a concise listing of available options, grouped by prefix"""
698-
from itertools import groupby
699-
from textwrap import wrap
700-
701-
def pp(name: str, ks: Iterable[str]) -> list[str]:
702-
pfx = "- " + name + ".[" if name else ""
703-
ls = wrap(
704-
", ".join(ks),
705-
width,
706-
initial_indent=pfx,
707-
subsequent_indent=" ",
708-
break_long_words=False,
709-
)
710-
if ls and ls[-1] and name:
711-
ls[-1] = ls[-1] + "]"
712-
return ls
713-
714-
ls: list[str] = []
715-
singles = [x for x in sorted(keys) if x.find(".") < 0]
716-
if singles:
717-
ls += pp("", singles)
718-
keys = [x for x in keys if x.find(".") >= 0]
719-
720-
for k, g in groupby(sorted(keys), lambda x: x[: x.rfind(".")]):
721-
ks = [x[len(k) + 1 :] for x in list(g)]
722-
ls += pp(k, ks)
723-
s = "\n".join(ls)
724-
if _print:
725-
print(s)
726-
return s
727-
728-
729-
#
730679
# helpers
731680

732681

pandas/core/strings/accessor.py

-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ def _wrap_result(
259259
expand: bool | None = None,
260260
fill_value=np.nan,
261261
returns_string: bool = True,
262-
returns_bool: bool = False,
263262
dtype=None,
264263
):
265264
from pandas import (

pandas/io/parsers/readers.py

-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
Callable,
2121
Generic,
2222
Literal,
23-
NamedTuple,
2423
TypedDict,
2524
overload,
2625
)
@@ -563,11 +562,6 @@ class _Fwf_Defaults(TypedDict):
563562
}
564563

565564

566-
class _DeprecationConfig(NamedTuple):
567-
default_value: Any
568-
msg: str | None
569-
570-
571565
@overload
572566
def validate_integer(name: str, val: None, min_val: int = ...) -> None: ...
573567

pandas/io/xml.py

-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ def __init__(
172172
self.encoding = encoding
173173
self.stylesheet = stylesheet
174174
self.iterparse = iterparse
175-
self.is_style = None
176175
self.compression: CompressionOptions = compression
177176
self.storage_options = storage_options
178177

0 commit comments

Comments
 (0)