@@ -50,7 +50,7 @@ def read_text(
50
50
:class:`~pystac.Link`. If it is a string, it must be a URI or local path from
51
51
which to read. Using a :class:`~pystac.Link` enables implementations to use
52
52
additional link information, such as paging information contained in the
53
- extended links described in the `STAC API spec
53
+ extended links described in the `STAC API spec
54
54
<https://github.com/radiantearth/stac-api-spec/tree/master/item-search#paging>`__.
55
55
56
56
Args:
@@ -263,12 +263,11 @@ def default(cls) -> "StacIO":
263
263
264
264
265
265
class DefaultStacIO (StacIO ):
266
- def read_text (
267
- self , source : Union [str , "Link_Type" ], * _ : Any , ** __ : Any
268
- ) -> str :
269
- """A concrete implementation of :meth:`StacIO.read_text <pystac.StacIO.read_text>`. Converts the
270
- ``source`` argument to a string (if it is not already) and delegates to
271
- :meth:`DefaultStacIO.read_text_from_href` for opening and reading the file."""
266
+ def read_text (self , source : Union [str , "Link_Type" ], * _ : Any , ** __ : Any ) -> str :
267
+ """A concrete implementation of :meth:`StacIO.read_text
268
+ <pystac.StacIO.read_text>`. Converts the ``source`` argument to a string (if it
269
+ is not already) and delegates to :meth:`DefaultStacIO.read_text_from_href` for
270
+ opening and reading the file."""
272
271
href : Optional [str ]
273
272
if isinstance (source , str ):
274
273
href = source
@@ -305,9 +304,10 @@ def read_text_from_href(self, href: str) -> str:
305
304
def write_text (
306
305
self , dest : Union [str , "Link_Type" ], txt : str , * _ : Any , ** __ : Any
307
306
) -> None :
308
- """A concrete implementation of :meth:`StacIO.write_text <pystac.StacIO.write_text>`. Converts the
309
- ``dest`` argument to a string (if it is not already) and delegates to
310
- :meth:`DefaultStacIO.write_text_from_href` for opening and reading the file."""
307
+ """A concrete implementation of :meth:`StacIO.write_text
308
+ <pystac.StacIO.write_text>`. Converts the ``dest`` argument to a string (if it
309
+ is not already) and delegates to :meth:`DefaultStacIO.write_text_from_href` for
310
+ opening and reading the file."""
311
311
href : Optional [str ]
312
312
if isinstance (dest , str ):
313
313
href = dest
@@ -317,9 +317,7 @@ def write_text(
317
317
raise IOError (f"Could not get an absolute HREF from link { dest } " )
318
318
return self .write_text_to_href (href , txt )
319
319
320
- def write_text_to_href (
321
- self , href : str , txt : str
322
- ) -> None :
320
+ def write_text_to_href (self , href : str , txt : str ) -> None :
323
321
"""Writes text to file using UTF-8 encoding.
324
322
325
323
This implementation uses :func:`open` and therefore can only write to the local
0 commit comments