Skip to content

Fix #777 #778

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 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
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
51 changes: 29 additions & 22 deletions pandas-stubs/plotting/_core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -239,71 +239,78 @@ class PlotAccessor:
**kwargs: Any,
) -> pd.Series: ...
@overload
def line( # type: ignore[misc]
def line(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None is Hashable

y: Hashable = ...,
color: _PlotAccessorColor = ...,
*,
subplots: Literal[False] | None = ...,
**kwargs,
) -> Axes: ...
@overload
def line(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
y: Hashable = ...,
color: _PlotAccessorColor = ...,
subplots: Literal[True] = ...,
*,
subplots: Literal[True],
**kwargs,
) -> npt.NDArray[np.object_]: ...
@overload
def bar( # type: ignore[misc]
def bar(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
y: Hashable = ...,
color: _PlotAccessorColor = ...,
*,
subplots: Literal[False] | None = ...,
**kwargs,
) -> Axes: ...
@overload
def bar(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
y: Hashable = ...,
color: _PlotAccessorColor = ...,
subplots: Literal[True] = ...,
*,
subplots: Literal[True],
**kwargs,
) -> npt.NDArray[np.object_]: ...
@overload
def barh( # type: ignore[misc]
def barh(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
y: Hashable = ...,
color: _PlotAccessorColor = ...,
subplots: Literal[False] | None = ...,
**kwargs,
) -> Axes: ...
@overload
def barh(
self,
x: Hashable | None = ...,
y: Hashable | None = ...,
x: Hashable = ...,
y: Hashable = ...,
color: _PlotAccessorColor = ...,
subplots: Literal[True] = ...,
*,
subplots: Literal[True],
**kwargs,
) -> npt.NDArray[np.object_]: ...
@overload
def box( # type: ignore[misc]
def box(
self,
by: Hashable | list[HashableT] | None = ...,
by: Hashable | list[HashableT] = ...,
*,
subplots: Literal[False] | None = ...,
**kwargs,
) -> Axes: ...
@overload
def box(
self,
by: Hashable | list[HashableT] | None = ...,
subplots: Literal[True] = ...,
by: Hashable | list[HashableT] = ...,
*,
subplots: Literal[True],
**kwargs,
) -> Series: ...
@overload
Expand Down