diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf03d2631..879ae8277 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/plotnine/geoms/geom_path.py b/plotnine/geoms/geom_path.py index 206f9a159..90c0c76ee 100644 --- a/plotnine/geoms/geom_path.py +++ b/plotnine/geoms/geom_path.py @@ -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"], ) diff --git a/plotnine/geoms/geom_raster.py b/plotnine/geoms/geom_raster.py index 17f1f19ab..ac0276fea 100644 --- a/plotnine/geoms/geom_raster.py +++ b/plotnine/geoms/geom_raster.py @@ -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: diff --git a/plotnine/geoms/geom_segment.py b/plotnine/geoms/geom_segment.py index 0b0d0d5de..012d93b6b 100644 --- a/plotnine/geoms/geom_segment.py +++ b/plotnine/geoms/geom_segment.py @@ -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"], ) diff --git a/plotnine/geoms/geom_text.py b/plotnine/geoms/geom_text.py index a8b9b4327..c3ce21646 100644 --- a/plotnine/geoms/geom_text.py +++ b/plotnine/geoms/geom_text.py @@ -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"]