google-analytics icon indicating copy to clipboard operation
google-analytics copied to clipboard

Docstring Error: Precision keyword argument not supported for '.range(...)' method

Open DeflateAwning opened this issue 5 years ago • 0 comments

This docstring function documentation appears to be wrong:

precision(self, precision) For queries that should run faster, you may specify a lower precision, and for those that need to be more precise, a higher precision:

# faster queries
query.range('2014-01-01', '2014-01-31', precision=0)
query.range('2014-01-01', '2014-01-31', precision='FASTER')
# queries with the default level of precision (usually what you want)
query.range('2014-01-01', '2014-01-31')
query.range('2014-01-01', '2014-01-31', precision=1)
query.range('2014-01-01', '2014-01-31', precision='DEFAULT')
# queries that are more precise
query.range('2014-01-01', '2014-01-31', precision=2)
query.range('2014-01-01', '2014-01-31', precision='HIGHER_PRECISION')

Running this gives an error: TypeError: range() got an unexpected keyword argument 'precision'. Presumably the docstring should be updated, at least until the keyword argument is supported.

DeflateAwning avatar Dec 15 '20 17:12 DeflateAwning