Skip to content

Commit 1411742

Browse files
authored
Fix #777 (#778)
1 parent d8cdcb5 commit 1411742

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

pandas-stubs/plotting/_core.pyi

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -239,71 +239,78 @@ class PlotAccessor:
239239
**kwargs: Any,
240240
) -> pd.Series: ...
241241
@overload
242-
def line( # type: ignore[misc]
242+
def line(
243243
self,
244-
x: Hashable | None = ...,
245-
y: Hashable | None = ...,
244+
x: Hashable = ...,
245+
y: Hashable = ...,
246246
color: _PlotAccessorColor = ...,
247+
*,
247248
subplots: Literal[False] | None = ...,
248249
**kwargs,
249250
) -> Axes: ...
250251
@overload
251252
def line(
252253
self,
253-
x: Hashable | None = ...,
254-
y: Hashable | None = ...,
254+
x: Hashable = ...,
255+
y: Hashable = ...,
255256
color: _PlotAccessorColor = ...,
256-
subplots: Literal[True] = ...,
257+
*,
258+
subplots: Literal[True],
257259
**kwargs,
258260
) -> npt.NDArray[np.object_]: ...
259261
@overload
260-
def bar( # type: ignore[misc]
262+
def bar(
261263
self,
262-
x: Hashable | None = ...,
263-
y: Hashable | None = ...,
264+
x: Hashable = ...,
265+
y: Hashable = ...,
264266
color: _PlotAccessorColor = ...,
267+
*,
265268
subplots: Literal[False] | None = ...,
266269
**kwargs,
267270
) -> Axes: ...
268271
@overload
269272
def bar(
270273
self,
271-
x: Hashable | None = ...,
272-
y: Hashable | None = ...,
274+
x: Hashable = ...,
275+
y: Hashable = ...,
273276
color: _PlotAccessorColor = ...,
274-
subplots: Literal[True] = ...,
277+
*,
278+
subplots: Literal[True],
275279
**kwargs,
276280
) -> npt.NDArray[np.object_]: ...
277281
@overload
278-
def barh( # type: ignore[misc]
282+
def barh(
279283
self,
280-
x: Hashable | None = ...,
281-
y: Hashable | None = ...,
284+
x: Hashable = ...,
285+
y: Hashable = ...,
282286
color: _PlotAccessorColor = ...,
283287
subplots: Literal[False] | None = ...,
284288
**kwargs,
285289
) -> Axes: ...
286290
@overload
287291
def barh(
288292
self,
289-
x: Hashable | None = ...,
290-
y: Hashable | None = ...,
293+
x: Hashable = ...,
294+
y: Hashable = ...,
291295
color: _PlotAccessorColor = ...,
292-
subplots: Literal[True] = ...,
296+
*,
297+
subplots: Literal[True],
293298
**kwargs,
294299
) -> npt.NDArray[np.object_]: ...
295300
@overload
296-
def box( # type: ignore[misc]
301+
def box(
297302
self,
298-
by: Hashable | list[HashableT] | None = ...,
303+
by: Hashable | list[HashableT] = ...,
304+
*,
299305
subplots: Literal[False] | None = ...,
300306
**kwargs,
301307
) -> Axes: ...
302308
@overload
303309
def box(
304310
self,
305-
by: Hashable | list[HashableT] | None = ...,
306-
subplots: Literal[True] = ...,
311+
by: Hashable | list[HashableT] = ...,
312+
*,
313+
subplots: Literal[True],
307314
**kwargs,
308315
) -> Series: ...
309316
@overload

0 commit comments

Comments
 (0)