Skip to content

Commit

Permalink
Fix some ruff warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Oct 30, 2024
1 parent 8a2f8df commit 1abb17f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ write_to = "xbout/_version.py"
[tool.setuptools]
packages = ["xbout"]

[tool.ruff]
[tool.ruff.lint]
ignore = ["E501"]
4 changes: 2 additions & 2 deletions xbout/plotting/plotfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit 1abb17f

Please sign in to comment.