Skip to content

Add defaults for parameters #1293

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 23 commits into from
Aug 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 9 deletions pandas-stubs/_libs/tslibs/timestamps.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,7 @@ class Timestamp(datetime, SupportsIndex):
def isoformat(
self,
sep: str = "T",
timespec: Literal[
"auto",
"hours",
"minutes",
"seconds",
"milliseconds",
"microseconds",
"nanoseconds",
] = "auto",
timespec: str = "auto",
) -> str: ...
@classmethod
def strptime(cls, date_string: Never, format: Never) -> Never: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/io/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ from pandas.io.parsers import (
)
from pandas.io.pickle import (
read_pickle as read_pickle,
to_pickle as to_pickle,
)
from pandas.io.pytables import (
HDFStore as HDFStore,
Expand Down
6 changes: 2 additions & 4 deletions tests/test_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def test_index_astype() -> None:
indc = indi.astype(inds.dtype)
check(assert_type(indc, pd.Index), pd.Index)
mi = pd.MultiIndex.from_product([["a", "b"], ["c", "d"]], names=["ab", "cd"])
mia = mi.astype(object) # object is only valid parameter for MultiIndex.astype()
check(assert_type(mia, pd.MultiIndex), pd.MultiIndex)
check(
assert_type(mi.to_frame(name=[3, 7], allow_duplicates=True), pd.DataFrame),
pd.DataFrame,
Expand Down Expand Up @@ -1346,8 +1344,8 @@ def test_datetime_index_max_min_reductions() -> None:
dtidx = pd.DatetimeIndex(["2020-01-01", "2020-01-02"])
check(assert_type(dtidx.argmax(), np.int64), np.int64)
check(assert_type(dtidx.argmin(), np.int64), np.int64)
check(assert_type(dtidx.max(), pd.Timestamp), pd.Timestamp)
check(assert_type(dtidx.min(), pd.Timestamp), pd.Timestamp)
check(assert_type(dtidx.max(), Any), pd.Timestamp)
check(assert_type(dtidx.min(), Any), pd.Timestamp)


def test_periodindex_shift() -> None:
Expand Down
5 changes: 0 additions & 5 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
)
from tests import NUMPY20 # See https://github.com/PyTables/PyTables/issues/1172

from pandas.io.api import to_pickle
from pandas.io.parsers import TextFileReader
from pandas.io.pytables import (
TableIterator,
Expand Down Expand Up @@ -125,10 +124,6 @@ def test_pickle():
check(assert_type(DF.to_pickle(path), None), type(None))
check(assert_type(read_pickle(path), Any), DataFrame)

with ensure_clean() as path:
check(assert_type(to_pickle(DF, path), None), type(None))
check(assert_type(read_pickle(path), Any), DataFrame)


def test_pickle_file_handle():
with ensure_clean() as path:
Expand Down
Loading