Skip to content

Commit

Permalink
🩹 Fix issue with xr.DataArray
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand committed Sep 27, 2024
1 parent 69780cf commit f959889
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyglotaran_extras/config/plot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from typing import cast

import numpy as np
import xarray as xr
from docstring_parser import parse as parse_docstring
from matplotlib.axes import Axes
from pydantic import BaseModel
Expand Down Expand Up @@ -479,7 +480,9 @@ def find_axes(
Axes
"""
for value in values:
if isinstance(value, str):
# This are iterables where we are sure that they can not contain `Axes` so we can skip them
# early
if isinstance(value, str | xr.Dataset | xr.DataArray):
continue
elif isinstance(value, Axes):
yield value
Expand Down

0 comments on commit f959889

Please sign in to comment.