-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 160. **params arg in IVDataService.get now raises warning when case insensitively matches other parameters #174
Conversation
…ions verify_case_insensitive_kwargs verifies that variadic keyword argument names do not colide with positional, keyword, or keyword only arguments when case is ignored
…ely match names of other method parameters
I like the plan to transition from warnings to exceptions. I think using the decorator was a good idea to facilitate this. Thanks for the contribution! |
For sure! It was fun to become more familiar with python's If there are no open other comments, I think we can merge. |
See #176:
|
IVDataService.get
's**params
argument is susceptible to malformed case entries (i.e.service.get(startdt="2022-01-01", ...)
should instead beservice.get(startDT="2022-01-01", ...)
). This PR resolves this issue. Now, the above case, or any case where a**params
argument case insensitively matches a non-**params
argument, throws aRuntimeWarning
and notes the parameters that are likely malformed. This behavior should change to an exception oncenwis_client
> 3.0.X.fixes #160.
Changes
nwis_client.IVDataService.get
throwsRuntimeWarning
when arguments in**params
case insensitively match a non-**params
argument. (i.e.service.get(startdt="2022-01-01", ...)
the correct call isservice.get(startDT="2022-01-01", ...)
)Todos
RuntimeError
oncenwis_client
> 3.0.XChecklist