diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b9859c..39d5212 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.3.3' + rev: 'v0.5.0' hooks: - id: ruff args: [--fix] diff --git a/examples/plot_surface_animation.py b/examples/plot_surface_animation.py index 096b56b..d528049 100644 --- a/examples/plot_surface_animation.py +++ b/examples/plot_surface_animation.py @@ -73,9 +73,9 @@ def update_surface(t): date_string = dates[t].astype("O").strftime("%H:%M") title.set_text(f"{date_string}") - time_line.set_xdata(dates[t]) + time_line.set_xdata([dates[t]]) mesh.set_array(output[t, :, :, i].T) - sun.set_data(sun_loc[t], 0) + sun.set_data([sun_loc[t]], [0]) ani = FuncAnimation(fig, update_surface, frames=range(ndates), interval=25) diff --git a/examples/plot_version_diff_surface.py b/examples/plot_version_diff_surface.py index 232ba47..2a8564d 100644 --- a/examples/plot_version_diff_surface.py +++ b/examples/plot_version_diff_surface.py @@ -49,7 +49,7 @@ fig, axarr = plt.subplots(nrows=3, ncols=3, constrained_layout=True, figsize=(8, 6)) xx, yy = np.meshgrid(lons, lats) norm = mpl.colors.Normalize(-50, 50) -cmap = mpl.cm.get_cmap("RdBu_r") +cmap = mpl.colormaps["RdBu_r"] for i, ax in enumerate(axarr.flatten()): mesh = ax.pcolormesh(xx, yy, diff[:, :, i].T, shading="auto", norm=norm, cmap=cmap) ax.set_title(f"{variables[i]}")