Skip to content

Commit 29d2fd7

Browse files
committed
apply defaults from source code
1 parent b544b4e commit 29d2fd7

File tree

18 files changed

+75
-75
lines changed

18 files changed

+75
-75
lines changed

pandas-stubs/_testing/__init__.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def assert_almost_equal(
4141
atol: float = 1e-8,
4242
**kwargs,
4343
) -> None: ...
44-
def assert_dict_equal(left: dict, right: dict, compare_keys: bool = ...) -> None: ...
44+
def assert_dict_equal(left: dict, right: dict, compare_keys: bool = True) -> None: ...
4545
def assert_index_equal(
4646
left: Index,
4747
right: Index,
@@ -55,7 +55,7 @@ def assert_index_equal(
5555
obj: str = "Index",
5656
) -> None: ...
5757
def assert_class_equal(
58-
left: T, right: T, exact: bool | Literal["equiv"] = ..., obj: str = ...
58+
left: T, right: T, exact: bool | Literal["equiv"] = True, obj: str = "Input"
5959
) -> None: ...
6060
def assert_attr_equal(
6161
attr: str, left: object, right: object, obj: str = "Attributes"
@@ -78,13 +78,13 @@ def assert_interval_array_equal(
7878
obj: str = "IntervalArray",
7979
) -> None: ...
8080
def assert_period_array_equal(
81-
left: PeriodArray, right: PeriodArray, obj: str = ...
81+
left: PeriodArray, right: PeriodArray, obj: str = "PeriodArray"
8282
) -> None: ...
8383
def assert_datetime_array_equal(
84-
left: DatetimeArray, right: DatetimeArray, check_freq: bool = ...
84+
left: DatetimeArray, right: DatetimeArray, check_freq: bool = True
8585
) -> None: ...
8686
def assert_timedelta_array_equal(
87-
left: TimedeltaArray, right: TimedeltaArray, check_freq: bool = ...
87+
left: TimedeltaArray, right: TimedeltaArray, check_freq: bool = True
8888
) -> None: ...
8989
def assert_numpy_array_equal(
9090
left,
@@ -185,5 +185,5 @@ def assert_produces_warning(
185185
) -> Generator[list[warnings.WarningMessage], None, None]: ...
186186
@contextmanager
187187
def ensure_clean(
188-
filename: str | None = ..., return_filelike: bool = False, **kwargs: Any
188+
filename: str | None = None, return_filelike: bool = False, **kwargs: Any
189189
) -> Generator[str, None, None]: ...

pandas-stubs/core/algorithms.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def value_counts(
6767
sort: bool = True,
6868
ascending: bool = False,
6969
normalize: bool = False,
70-
bins: int | None = ...,
70+
bins: int | None = None,
7171
dropna: bool = True,
7272
) -> Series: ...
7373
def take(

pandas-stubs/core/computation/eval.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def eval(
1919
expr: str | BinOp,
2020
parser: Literal["pandas", "python"] = "pandas",
2121
engine: Literal["python", "numexpr"] | None = "numexpr",
22-
local_dict: dict[str, Any] | None = ...,
23-
global_dict: dict[str, Any] | None = ...,
22+
local_dict: dict[str, Any] | None = None,
23+
global_dict: dict[str, Any] | None = None,
2424
resolvers: list[Mapping] | None = ...,
25-
level: int = ...,
25+
level: int = 0,
2626
target: object | None = None,
2727
inplace: bool = False,
2828
) -> npt.NDArray | Scalar | DataFrame | Series | None: ...

pandas-stubs/core/construction.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ from pandas.core.dtypes.dtypes import ExtensionDtype
77

88
def array(
99
data: Sequence[object],
10-
dtype: str | np.dtype | ExtensionDtype | None = ...,
10+
dtype: str | np.dtype | ExtensionDtype | None = None,
1111
copy: bool = True,
1212
) -> ExtensionArray: ...

pandas-stubs/core/frame.pyi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,32 +1648,32 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
16481648
def plot(self) -> PlotAccessor: ...
16491649
def hist(
16501650
self,
1651-
column: _str | list[_str] | None = ...,
1652-
by: _str | ListLike | None = ...,
1651+
column: _str | list[_str] | None = None,
1652+
by: _str | ListLike | None = None,
16531653
grid: _bool = True,
16541654
xlabelsize: float | str | None = None,
16551655
xrot: float | None = None,
16561656
ylabelsize: float | str | None = None,
16571657
yrot: float | None = None,
16581658
ax: PlotAxes | None = None,
1659-
sharex: _bool = ...,
1659+
sharex: _bool = False,
16601660
sharey: _bool = False,
1661-
figsize: tuple[float, float] | None = ...,
1662-
layout: tuple[int, int] | None = ...,
1661+
figsize: tuple[float, float] | None = None,
1662+
layout: tuple[int, int] | None = None,
16631663
bins: int | list = 10,
16641664
backend: _str | None = None,
16651665
**kwargs: Any,
16661666
): ...
16671667
def boxplot(
16681668
self,
1669-
column: _str | list[_str] | None = ...,
1670-
by: _str | ListLike | None = ...,
1671-
ax: PlotAxes | None = ...,
1672-
fontsize: float | _str | None = ...,
1669+
column: _str | list[_str] | None = None,
1670+
by: _str | ListLike | None = None,
1671+
ax: PlotAxes | None = None,
1672+
fontsize: float | _str | None = None,
16731673
rot: float = 0,
16741674
grid: _bool = True,
1675-
figsize: tuple[float, float] | None = ...,
1676-
layout: tuple[int, int] | None = ...,
1675+
figsize: tuple[float, float] | None = None,
1676+
layout: tuple[int, int] | None = None,
16771677
return_type: Literal["axes", "dict", "both"] | None = "axes",
16781678
backend: _str | None = None,
16791679
**kwargs: Any,

pandas-stubs/core/indexes/datetimes.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ class DatetimeIndex(DatetimeTimedeltaMixin[Timestamp], DatetimeIndexProperties):
9999
def shift(self, periods: int = 1, freq=...) -> Self: ...
100100

101101
def date_range(
102-
start: str | DateAndDatetimeLike | None = ...,
103-
end: str | DateAndDatetimeLike | None = ...,
104-
periods: int | None = ...,
102+
start: str | DateAndDatetimeLike | None = None,
103+
end: str | DateAndDatetimeLike | None = None,
104+
periods: int | None = None,
105105
freq: str | timedelta | Timedelta | BaseOffset = "D",
106-
tz: TimeZones = ...,
106+
tz: TimeZones = None,
107107
normalize: bool = False,
108108
name: Hashable | None = None,
109109
inclusive: IntervalClosedType = "both",

pandas-stubs/core/indexes/period.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ def period_range(
9292
str | datetime.datetime | datetime.date | pd.Timestamp | pd.Period | None
9393
) = None,
9494
periods: int | None = None,
95-
freq: str | BaseOffset | None = ...,
95+
freq: str | BaseOffset | None = None,
9696
name: Hashable | None = None,
9797
) -> PeriodIndex: ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import pandas as pd
22

3-
def from_dataframe(df, allow_copy: bool = ...) -> pd.DataFrame: ...
3+
def from_dataframe(df, allow_copy: bool = True) -> pd.DataFrame: ...

pandas-stubs/core/reshape/encoding.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_dummies(
2020
columns: list[HashableT2] | None = None,
2121
sparse: bool = False,
2222
drop_first: bool = False,
23-
dtype: Dtype | None = ...,
23+
dtype: Dtype | None = None,
2424
) -> DataFrame: ...
2525
def from_dummies(
2626
data: DataFrame,

pandas-stubs/core/reshape/melt.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ from pandas._typing import HashableT
77

88
def melt(
99
frame: DataFrame,
10-
id_vars: tuple | list | np.ndarray | None = ...,
11-
value_vars: tuple | list | np.ndarray | None = ...,
10+
id_vars: tuple | list | np.ndarray | None = None,
11+
value_vars: tuple | list | np.ndarray | None = None,
1212
var_name: str | None = None,
1313
value_name: Hashable = "value",
14-
col_level: int | str | None = ...,
14+
col_level: int | str | None = None,
1515
ignore_index: bool = True,
1616
) -> DataFrame: ...
1717
def lreshape(

0 commit comments

Comments
 (0)