Commit 8fdd267
Fix get_results: preserve user-supplied WQX3.0 dataProfile
The validation block silently overwrote any user-supplied
WQX3.0 dataProfile because the `else` clause attached to the *outer*
`if "dataProfile" in kwargs and ... not in result_profiles_wqx3` and
fired whenever that compound condition was False — including the case
where the user passed a *valid* profile like "narrow" or "basicPhysChem".
The documented example `dataProfile="narrow"` therefore did not actually
request the narrow profile.
Restructure the WQX3.0 branch so the default (`fullPhysChem`) is only
applied when the user did *not* set `dataProfile` at all. Also raise
`ValueError` rather than `TypeError` for invalid profile values (these
are bad values, not bad types) and call the constructor with a single
formatted message — the previous code passed two separate strings,
producing a tuple-args exception.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 51ac674 commit 8fdd267
2 files changed
Lines changed: 43 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
0 commit comments