Skip to content

Commit

Permalink
improved error message invalid types data models
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato committed Apr 2, 2024
1 parent 643b845 commit a8ee22b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spatialdata/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def parse(cls, data: Any, **kwargs: Any) -> GeoDataFrame:
-------
:class:`geopandas.GeoDataFrame`
"""
raise NotImplementedError()
raise TypeError(f"ShapesModel.parse() does not support the type {type(data)}")

@parse.register(np.ndarray)
@classmethod
Expand Down Expand Up @@ -550,7 +550,7 @@ def parse(cls, data: Any, **kwargs: Any) -> DaskDataFrame:
The order of the columns of the dataframe returned by the parser is not guaranteed to be the same as the order
of the columns in the dataframe passed as an argument.
"""
raise NotImplementedError()
raise TypeError(f"PointsModel.parse() does not support the type {type(data)}")

@parse.register(np.ndarray)
@classmethod
Expand Down

0 comments on commit a8ee22b

Please sign in to comment.