-
-
Notifications
You must be signed in to change notification settings - Fork 145
Add more parameter defaults #1318
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,30 +310,30 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin): | |
# int gets hit first and so the correct type is returned | ||
@overload | ||
def interval_range( # pyright: ignore[reportOverlappingOverload] | ||
start: int | None = ..., | ||
end: int | None = ..., | ||
periods: int | None = ..., | ||
freq: int | None = ..., | ||
name: Hashable = ..., | ||
closed: IntervalClosedType = ..., | ||
start: int | None = None, | ||
end: int | None = None, | ||
periods: int | None = None, | ||
freq: int | None = None, | ||
name: Hashable = None, | ||
closed: IntervalClosedType = "right", | ||
) -> IntervalIndex[Interval[int]]: ... | ||
@overload | ||
def interval_range( | ||
start: float | None = ..., | ||
end: float | None = ..., | ||
periods: int | None = ..., | ||
freq: int | None = ..., | ||
name: Hashable = ..., | ||
closed: IntervalClosedType = ..., | ||
start: float | None = None, | ||
end: float | None = None, | ||
periods: int | None = None, | ||
freq: int | None = None, | ||
name: Hashable = None, | ||
closed: IntervalClosedType = "right", | ||
) -> IntervalIndex[Interval[float]]: ... | ||
@overload | ||
def interval_range( | ||
start: _TimestampLike, | ||
end: _TimestampLike | None = ..., | ||
periods: int | None = ..., | ||
freq: str | BaseOffset | pd.Timedelta | dt.timedelta | None = ..., | ||
name: Hashable = ..., | ||
closed: IntervalClosedType = ..., | ||
end: _TimestampLike | None = None, | ||
periods: int | None = None, | ||
freq: str | BaseOffset | pd.Timedelta | dt.timedelta | None = None, | ||
name: Hashable = None, | ||
closed: IntervalClosedType = "right", | ||
) -> IntervalIndex[Interval[pd.Timestamp]]: ... | ||
@overload | ||
def interval_range( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing some defaults here |
||
|
@@ -348,11 +348,11 @@ def interval_range( | |
@overload | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing some defaults in lines 341 to 346 |
||
def interval_range( | ||
start: _TimedeltaLike, | ||
end: _TimedeltaLike | None = ..., | ||
periods: int | None = ..., | ||
freq: str | BaseOffset | pd.Timedelta | dt.timedelta | None = ..., | ||
name: Hashable = ..., | ||
closed: IntervalClosedType = ..., | ||
end: _TimedeltaLike | None = None, | ||
periods: int | None = None, | ||
freq: str | BaseOffset | pd.Timedelta | dt.timedelta | None = None, | ||
name: Hashable = None, | ||
closed: IntervalClosedType = "right", | ||
) -> IntervalIndex[Interval[pd.Timedelta]]: ... | ||
@overload | ||
def interval_range( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing defaults in the parameters below |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,42 +38,42 @@ def merge( | |
def merge_ordered( | ||
left: DataFrame, | ||
right: DataFrame, | ||
on: Label | list[HashableT] | None = ..., | ||
left_on: Label | list[HashableT] | None = ..., | ||
right_on: Label | list[HashableT] | None = ..., | ||
left_by: Label | list[HashableT] | None = ..., | ||
right_by: Label | list[HashableT] | None = ..., | ||
fill_method: Literal["ffill"] | None = ..., | ||
on: Label | list[HashableT] | None = None, | ||
left_on: Label | list[HashableT] | None = None, | ||
right_on: Label | list[HashableT] | None = None, | ||
left_by: Label | list[HashableT] | None = None, | ||
right_by: Label | list[HashableT] | None = None, | ||
fill_method: Literal["ffill"] | None = None, | ||
suffixes: Suffixes = ..., | ||
Comment on lines
+46
to
47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
how: JoinHow = ..., | ||
how: JoinHow = "outer", | ||
) -> DataFrame: ... | ||
@overload | ||
def merge_ordered( | ||
left: Series, | ||
right: DataFrame | Series, | ||
on: Label | list[HashableT] | None = ..., | ||
left_on: Label | list[HashableT] | None = ..., | ||
right_on: Label | list[HashableT] | None = ..., | ||
left_by: None = ..., | ||
right_by: None = ..., | ||
fill_method: Literal["ffill"] | None = ..., | ||
on: Label | list[HashableT] | None = None, | ||
left_on: Label | list[HashableT] | None = None, | ||
right_on: Label | list[HashableT] | None = None, | ||
left_by: None = None, | ||
right_by: None = None, | ||
fill_method: Literal["ffill"] | None = None, | ||
suffixes: ( | ||
list[str | None] | tuple[str, str] | tuple[None, str] | tuple[str, None] | ||
) = ..., | ||
Comment on lines
60
to
62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be |
||
how: JoinHow = ..., | ||
how: JoinHow = "outer", | ||
) -> DataFrame: ... | ||
@overload | ||
def merge_ordered( | ||
left: DataFrame | Series, | ||
right: Series, | ||
on: Label | list[HashableT] | None = ..., | ||
left_on: Label | list[HashableT] | None = ..., | ||
right_on: Label | list[HashableT] | None = ..., | ||
left_by: None = ..., | ||
right_by: None = ..., | ||
fill_method: Literal["ffill"] | None = ..., | ||
on: Label | list[HashableT] | None = None, | ||
left_on: Label | list[HashableT] | None = None, | ||
right_on: Label | list[HashableT] | None = None, | ||
left_by: None = None, | ||
right_by: None = None, | ||
fill_method: Literal["ffill"] | None = None, | ||
suffixes: Suffixes = ..., | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needs default |
||
how: JoinHow = ..., | ||
how: JoinHow = "outer", | ||
) -> DataFrame: ... | ||
def merge_asof( | ||
left: DataFrame | Series, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't you add defaults for the ones with
...
in them above?