Skip to content

Commit 7c104a9

Browse files
authored
Merge branch 'data_kind/return' into refactor/data_kind
2 parents a9d094c + 3d8be4d commit 7c104a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pygmt/helpers/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ def _check_encoding(
189189

190190

191191
def data_kind( # noqa: PLR0911
192-
data: Any = None, required: bool = True
192+
data: Any, required: bool = True
193193
) -> Literal[
194194
"arg", "file", "geojson", "grid", "image", "matrix", "stringio", "vectors"
195195
]:
196196
r"""
197197
Check the kind of data that is provided to a module.
198198
199-
The ``data`` argument can be in any type. Following data kinds are recognized:
199+
The ``data`` argument can be in any types. Following data kinds are recognized:
200200
201201
- ``"arg"``: data is ``None`` and ``required=False``, or bool, int, float,
202202
representing an optional argument, used for dealing with optional virtual files
@@ -206,6 +206,7 @@ def data_kind( # noqa: PLR0911
206206
(e.g., geopandas.GeoDataFrame or shapely.geometry)
207207
- ``"grid"``: a :class:`xarray.DataArray` object that is not 3-D
208208
- ``"image"``: a 3-D :class:`xarray.DataArray` object
209+
- ``"stringio"``: a :class:`io.StringIO` object
209210
- ``"matrix"``: a 2-D :class:`numpy.ndarray` object
210211
- ``"vectors"``: fallback to ``"vectors"`` for any unrecognized data. Common data
211212
types include, a :class:`pandas.DataFrame` object, a dictionary with array-like

0 commit comments

Comments
 (0)