Skip to content

Commit

Permalink
TYP: Fix new typechecking failures
Browse files Browse the repository at this point in the history
Caused by upgrading pandas-stubs.
  • Loading branch information
has2k1 committed Nov 28, 2024
1 parent e5e028b commit 262b383
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plotnine/_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ def cross_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
if len(df2) == 0:
return df1

return df1.join(df2, how="cross") # type: ignore
return df1.join(df2, how="cross")


def to_inches(value: float, units: str) -> float:
Expand Down
12 changes: 10 additions & 2 deletions plotnine/geoms/geom_ribbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,18 @@ def _draw_outline(

if outline_type in ("lower", "both"):
geom_path.draw_group(
data.eval(f"y = {y}min"), panel_params, coord, ax, **params
data.assign(y=data[f"{y}min"]),
panel_params,
coord,
ax,
**params,
)

if outline_type in ("upper", "both"):
geom_path.draw_group(
data.eval(f"y = {y}max"), panel_params, coord, ax, **params
data.assign(y=data[f"{y}max"]),
panel_params,
coord,
ax,
**params,
)

0 comments on commit 262b383

Please sign in to comment.