Skip to content

Commit a2febda

Browse files
authored
Merge branch 'main' into fix/747-collection-clone-removes-assets
2 parents dcd21c0 + 0c6074a commit a2febda

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- 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))
2727
- Deepcopy collection properties on clone. Implement `clone` method for `Summaries` ([#794](https://github.com/stac-utils/pystac/pull/794))
2828
- Collection assets are now preserved when using `Collection.clone` ([#834](https://github.com/stac-utils/pystac/pull/834))
29+
- 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))
2930

3031
## [v1.4.0]
3132

pystac/stac_io.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ class StacIO(ABC):
4242
def read_text(self, source: HREF, *args: Any, **kwargs: Any) -> str:
4343
"""Read text from the given URI.
4444
45-
The source to read from can be specified as a string or a
46-
:class:`~pystac.Link`. If it is a string, it must be a URI or local path from
47-
which to read. Using a :class:`~pystac.Link` enables implementations to use
48-
additional link information, such as paging information contained in the
49-
extended links described in the `STAC API spec
45+
The source to read from can be specified as a string or :class:`os.PathLike`
46+
object (:class:`~pystac.Link` is a path-like object). If it is a string, it
47+
must be a URI or local path from which to read. Using a :class:`~pystac.Link`
48+
enables implementations to use additional link information, such as paging
49+
information contained in the extended links described in the `STAC API spec
5050
<https://github.com/radiantearth/stac-api-spec/tree/master/item-search#paging>`__.
5151
5252
Args:
@@ -71,10 +71,11 @@ def write_text(
7171
) -> None:
7272
"""Write the given text to a file at the given URI.
7373
74-
The destination to write to from can be specified as a string or a
75-
:class:`~pystac.Link`. If it is a string, it must be a URI or local path from
76-
which to read. Using a :class:`~pystac.Link` enables implementations to use
77-
additional link information.
74+
The destination to write to can be specified as a string or
75+
:class:`os.PathLike` object (:class:`~pystac.Link` is a path-like object). If
76+
it is a string, it must be a URI or local path from which to read. Using a
77+
:class:`~pystac.Link` enables implementations to use additional link
78+
information.
7879
7980
Args:
8081
dest : The destination to write to.

requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jsonschema==4.6.0
88
coverage==6.4.1
99
doc8==0.11.2
1010

11-
types-python-dateutil==2.8.17
11+
types-python-dateutil==2.8.18
1212
types-orjson==3.6.2
1313

1414
pre-commit==2.19.0

0 commit comments

Comments
 (0)