Skip to content

Commit a2640a2

Browse files
authored
docs: add docstring returns section to Options (#937)
1 parent 71a8ab9 commit a2640a2

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

bigframes/_config/__init__.py

+27-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ def _init_bigquery_thread_local(self):
7373

7474
@property
7575
def bigquery(self) -> bigquery_options.BigQueryOptions:
76-
"""Options to use with the BigQuery engine."""
76+
"""Options to use with the BigQuery engine.
77+
78+
Returns:
79+
bigframes._config.bigquery_options.BigQueryOptions:
80+
Options for BigQuery engine.
81+
"""
7782
if self._local.bigquery_options is not None:
7883
# The only way we can get here is if someone called
7984
# _init_bigquery_thread_local.
@@ -83,7 +88,12 @@ def bigquery(self) -> bigquery_options.BigQueryOptions:
8388

8489
@property
8590
def display(self) -> display_options.DisplayOptions:
86-
"""Options controlling object representation."""
91+
"""Options controlling object representation.
92+
93+
Returns:
94+
bigframes._config.display_options.DisplayOptions:
95+
Options for controlling object representation.
96+
"""
8797
return self._local.display_options
8898

8999
@property
@@ -95,12 +105,21 @@ def sampling(self) -> sampling_options.SamplingOptions:
95105
(e.g., to_pandas, to_numpy, values) or implicitly (e.g.,
96106
matplotlib plotting). This option can be overriden by
97107
parameters in specific functions.
108+
109+
Returns:
110+
bigframes._config.sampling_options.SamplingOptions:
111+
Options for controlling downsampling.
98112
"""
99113
return self._local.sampling_options
100114

101115
@property
102116
def compute(self) -> compute_options.ComputeOptions:
103-
"""Thread-local options controlling object computation."""
117+
"""Thread-local options controlling object computation.
118+
119+
Returns:
120+
bigframes._config.compute_options.ComputeOptions:
121+
Thread-local options for controlling object computation
122+
"""
104123
return self._local.compute_options
105124

106125
@property
@@ -109,6 +128,11 @@ def is_bigquery_thread_local(self) -> bool:
109128
110129
A thread-local session can be started by using
111130
`with bigframes.option_context("bigquery.some_option", "some-value"):`.
131+
132+
Returns:
133+
bool:
134+
A boolean value, where a value is True if a thread-local session
135+
is in use; otherwise False.
112136
"""
113137
return self._local.bigquery_options is not None
114138

0 commit comments

Comments
 (0)