Skip to content

Commit

Permalink
Fix docs for StacIO.read/write_text (#835)
Browse files Browse the repository at this point in the history
* Fix docs for StacIO.read/write_text

* Add CHANGELOG entry for #835
  • Loading branch information
duckontheweb authored Jun 29, 2022
1 parent a6fffa5 commit afc12cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- "How to create STAC catalogs" tutorial ([#775](https://github.com/stac-utils/pystac/pull/775))
- Add a `variables` argument, to accompany `dimensions`, for the `apply` method of stac objects extended with datacube ([#782](https://github.com/stac-utils/pystac/pull/782))
- Deepcopy collection properties on clone. Implement `clone` method for `Summaries` ([#794](https://github.com/stac-utils/pystac/pull/794))
- Docstrings for `StacIO.read_text` and `StacIO.write_text` now match the type annotations for the `source` argument. ([#835](https://github.com/stac-utils/pystac/pull/835))

## [v1.4.0]

Expand Down
19 changes: 10 additions & 9 deletions pystac/stac_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class StacIO(ABC):
def read_text(self, source: HREF, *args: Any, **kwargs: Any) -> str:
"""Read text from the given URI.
The source to read from can be specified as a string or a
:class:`~pystac.Link`. If it is a string, it must be a URI or local path from
which to read. Using a :class:`~pystac.Link` enables implementations to use
additional link information, such as paging information contained in the
extended links described in the `STAC API spec
The source to read from can be specified as a string or :class:`os.PathLike`
object (:class:`~pystac.Link` is a path-like object). If it is a string, it
must be a URI or local path from which to read. Using a :class:`~pystac.Link`
enables implementations to use additional link information, such as paging
information contained in the extended links described in the `STAC API spec
<https://github.com/radiantearth/stac-api-spec/tree/master/item-search#paging>`__.
Args:
Expand All @@ -71,10 +71,11 @@ def write_text(
) -> None:
"""Write the given text to a file at the given URI.
The destination to write to from can be specified as a string or a
:class:`~pystac.Link`. If it is a string, it must be a URI or local path from
which to read. Using a :class:`~pystac.Link` enables implementations to use
additional link information.
The destination to write to can be specified as a string or
:class:`os.PathLike` object (:class:`~pystac.Link` is a path-like object). If
it is a string, it must be a URI or local path from which to read. Using a
:class:`~pystac.Link` enables implementations to use additional link
information.
Args:
dest : The destination to write to.
Expand Down

0 comments on commit afc12cc

Please sign in to comment.