Skip to content

Commit fac1bcc

Browse files
thodson-usgsclaude
andcommitted
Document get_watershed format-dependent return type
Per copilot review on PR #245. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e38faf5 commit fac1bcc

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

dataretrieval/streamstats.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,17 @@ def get_watershed(
105105
simplify: bool, optional
106106
Boolean flag controlling whether or not to simplify the returned
107107
result.
108+
format: string, optional
109+
Selects the return shape. ``"geojson"`` (default) returns the raw
110+
``requests.Response``; ``"object"`` returns the parsed JSON ``dict``;
111+
any other value returns a :obj:`Watershed` instance built from the
112+
parsed JSON.
108113
109114
Returns
110115
-------
111-
Watershed: :obj:`dataretrieval.streamstats.Watershed`
112-
Custom object that contains the watershed information as extracted
113-
from the streamstats JSON object.
116+
requests.Response, dict, or :obj:`dataretrieval.streamstats.Watershed`
117+
Watershed information from StreamStats. The exact return type
118+
depends on ``format`` (see above).
114119
115120
"""
116121
payload = {

0 commit comments

Comments
 (0)