Skip to content

Commit

Permalink
LINT: Upgrade ruff and fix new failures
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Sep 30, 2024
1 parent 6c71746 commit a7f841e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
rev: v0.6.8
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion plotnine/geoms/geom_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def _draw_segments(data: pd.DataFrame, ax: Axes, **params: Any):
edgecolor=edgecolor,
linewidth=linewidth,
linestyle=linestyle,
capstyle=params.get("lineend", None),
capstyle=params.get("lineend"),
zorder=params["zorder"],
rasterized=params["raster"],
)
Expand Down
2 changes: 1 addition & 1 deletion plotnine/geoms/geom_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
# 2. bool values for interpolation
if "interpolate" in kwargs:
kwargs["interpolation"] = kwargs.pop("interpolate")
if isinstance(kwargs.get("interpolation", None), bool):
if isinstance(kwargs.get("interpolation"), bool):
if kwargs["interpolation"] is True:
kwargs["interpolation"] = "bilinear"
else:
Expand Down
2 changes: 1 addition & 1 deletion plotnine/geoms/geom_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def draw_group(
edgecolor=color,
linewidth=linewidth,
linestyle=data["linetype"][0],
capstyle=params.get("lineend", None),
capstyle=params.get("lineend"),
zorder=params["zorder"],
rasterized=params["raster"],
)
Expand Down
2 changes: 1 addition & 1 deletion plotnine/geoms/geom_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __init__(
):
data, mapping = order_as_data_mapping(data, mapping)
nudge_kwargs = {}
adjust_text = kwargs.get("adjust_text", None)
adjust_text = kwargs.get("adjust_text")
if adjust_text is None:
with suppress(KeyError):
nudge_kwargs["x"] = kwargs["nudge_x"]
Expand Down

0 comments on commit a7f841e

Please sign in to comment.