Using dataretrieval 1.0.6 in my class this week. Students noticed the following in PyCharm:
I told them they could pass a single site as a string or a list of sites as a list of strings, but they were confused because the highlighted message says "Expected type 'array.pyi' got 'str' instead".
The documentation of the get_discharge_peaks function says "array of strings":
I even had one student who converted his site code to a Numpy array and passed it to the get_discharge_peaks function. The function actually returns a response, but it's not just for the one site - it had data for lots of sites. Didn't dig in too deep there.
Documentation of the sites parameter for other functions is ambiguous, but not as confusing. In PyCharm:
In the code:
@thodson-usgs - we could take a crack at cleaning this up unless this is intentional or there's another reason not to?
Using dataretrieval 1.0.6 in my class this week. Students noticed the following in PyCharm:
I told them they could pass a single site as a string or a list of sites as a list of strings, but they were confused because the highlighted message says "Expected type 'array.pyi' got 'str' instead".
The documentation of the get_discharge_peaks function says "array of strings":
I even had one student who converted his site code to a Numpy array and passed it to the get_discharge_peaks function. The function actually returns a response, but it's not just for the one site - it had data for lots of sites. Didn't dig in too deep there.
Documentation of the sites parameter for other functions is ambiguous, but not as confusing. In PyCharm:
In the code:
@thodson-usgs - we could take a crack at cleaning this up unless this is intentional or there's another reason not to?