From 1abb17f6a2371a1adc2379dd5003780333cd33bd Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 30 Oct 2024 10:16:12 +0000 Subject: [PATCH] Fix some ruff warnings --- pyproject.toml | 2 +- xbout/plotting/plotfuncs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0ed61625..53cd0aa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,5 +79,5 @@ write_to = "xbout/_version.py" [tool.setuptools] packages = ["xbout"] -[tool.ruff] +[tool.ruff.lint] ignore = ["E501"] diff --git a/xbout/plotting/plotfuncs.py b/xbout/plotting/plotfuncs.py index 525d9d02..0f9dc51f 100644 --- a/xbout/plotting/plotfuncs.py +++ b/xbout/plotting/plotfuncs.py @@ -929,10 +929,10 @@ def plot2d_polygon( if vmax is None: vmax = np.nanmax(da.max().values) - if colorbar_label == None: + if colorbar_label is None: if "short_name" in da.attrs: colorbar_label = da.attrs["short_name"] - elif da.name != None: + elif da.name is not None: colorbar_label = da.name else: colorbar_label = ""