Skip to content

Commit 8a268d2

Browse files
committed
make default False
1 parent a0ebc89 commit 8a268d2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pystac_client/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,14 @@ def get_collections(self) -> Iterator[Collection]:
443443
call_modifier(self.modifier, collection)
444444
yield collection
445445

446-
def get_items(self, *ids: str, recursive: bool = True) -> Iterator["Item_Type"]:
446+
def get_items(self, *ids: str, recursive: bool = False) -> Iterator["Item_Type"]:
447447
"""Return all items of this catalog.
448448
449449
Args:
450450
ids: Zero or more item ids to find.
451451
recursive : If True, search this catalog and all children for the
452452
item; otherwise, only search the items of this catalog. Defaults
453-
to True.
453+
to False.
454454
455455
Return:
456456
Iterator[Item]: Iterator of items whose parent is this
@@ -481,7 +481,7 @@ def get_all_items(self) -> Iterator["Item_Type"]:
481481
catalogs or collections connected to this catalog through
482482
child links.
483483
"""
484-
yield from self.get_items()
484+
yield from self.get_items(recursive=True)
485485

486486
def search(
487487
self,

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ def test_recursion_on_fallback() -> None:
789789
path = "https://raw.githubusercontent.com/stac-utils/pystac/v1.9.0/docs/example-catalog/catalog.json"
790790
catalog = Client.from_file(path)
791791
with pytest.warns(FallbackToPystac):
792-
next(catalog.get_items())
792+
next(catalog.get_items(recursive=True))
793793

794794

795795
@pytest.mark.vcr

0 commit comments

Comments
 (0)