Skip to content

Commit bd1e224

Browse files
fixedbydevparthea
andauthored
docs: correct return type in CellDataParser.time_to_py docstring (#17972)
Small docstring fix in `google-cloud-bigquery`. `CellDataParser.time_to_py` returns a `datetime.time` (via `.time()`), but its docstring reads "Coerce 'value' to a datetime date", which looks like it was copied from the neighbouring `date_to_py`. This just corrects "date" to "time" so the docstring matches what the method actually returns. No behavior change; docstring only. Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent fe7bfd0 commit bd1e224

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/google-cloud-bigquery/google/cloud/bigquery

‎packages/google-cloud-bigquery/google/cloud/bigquery/_helpers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def date_to_py(self, value, field):
295295
return _date_from_iso8601_date(value)
296296

297297
def time_to_py(self, value, field):
298-
"""Coerce 'value' to a datetime date, if set or not nullable"""
298+
"""Coerce 'value' to a datetime time, if set or not nullable"""
299299
if _not_null(value, field):
300300
if len(value) == 8: # HH:MM:SS
301301
fmt = _TIMEONLY_WO_MICROS

0 commit comments

Comments
 (0)