Skip to content

Commit 963342d

Browse files
thodson-usgsclaude
andcommitted
Use 'is True' check for legacy parity with the rest of wqp.py
Per copilot review on PR #250. Other helpers (what_sites, etc.) use 'legacy is True' to gate URL selection, so a non-bool value like 1 or 'false' would otherwise route differently in get_results vs the rest of the module. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9b61575 commit 963342d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dataretrieval/wqp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def get_results(
126126

127127
kwargs = _check_kwargs(kwargs)
128128

129-
if legacy:
129+
if legacy is True:
130130
valid_profiles = result_profiles_legacy
131131
kind = "legacy"
132132
url = wqp_url("Result")
@@ -141,7 +141,7 @@ def get_results(
141141
f"dataProfile {profile!r} is not a valid {kind} profile. "
142142
f"Valid options are {valid_profiles}."
143143
)
144-
if not legacy and profile is None:
144+
if legacy is not True and profile is None:
145145
kwargs["dataProfile"] = "fullPhysChem"
146146

147147
response = query(url, kwargs, delimiter=";", ssl_check=ssl_check)

0 commit comments

Comments
 (0)