Skip to content

Commit b2b87fd

Browse files
thodson-usgsclaude
andcommitted
Fix continuation in get_field_measurements multi-site example
Same pre-existing bug shape as the one PR 265 already fixed in get_daily: a list item on a continuation line without the doctest "... " prefix, which makes doctest end the example mid-bracket (SyntaxError: '[' was never closed). Found by exec'ing every example in the four PR-touched functions against the live USGS API. Reformatted to put each list element on its own properly-prefixed continuation line, matching the style used elsewhere in this file. While here, dropped the non-PEP8 spaces around the `=` of keyword arguments. After this fix, all 15 doctest examples in the four functions PR 265 touched pass when run with the package imported (15/15 across get_daily, get_latest_continuous, get_latest_daily, get_field_measurements; verified live against api.waterdata.usgs.gov). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5a82f2a commit b2b87fd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

dataretrieval/waterdata/api.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,10 +1512,12 @@ def get_field_measurements(
15121512
>>> # Get field measurements from multiple sites and
15131513
>>> # parameter codes from the last 20 years
15141514
>>> df, md = dataretrieval.waterdata.get_field_measurements(
1515-
... monitoring_location_id = ["USGS-451605097071701",
1516-
"USGS-263819081585801"],
1517-
... parameter_code = ["62611", "72019"],
1518-
... time = "P20Y"
1515+
... monitoring_location_id=[
1516+
... "USGS-451605097071701",
1517+
... "USGS-263819081585801",
1518+
... ],
1519+
... parameter_code=["62611", "72019"],
1520+
... time="P20Y",
15191521
... )
15201522
"""
15211523
service = "field-measurements"

0 commit comments

Comments
 (0)