Skip to content

Commit 6efdce1

Browse files
authored
docs: add/reformat return types for cloud RAD docs (#1582)
* docs: add/reformat return types for cloud RAD docs * fix typos
1 parent 63ba4a1 commit 6efdce1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

google/cloud/bigquery/client.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ def get_service_account_email(
327327
before using ``retry``.
328328
329329
Returns:
330-
str: service account email address
330+
str:
331+
service account email address
331332
332333
Example:
333334
@@ -1932,7 +1933,8 @@ def job_from_resource(
19321933
resource (Dict): one job resource from API response
19331934
19341935
Returns:
1935-
The job instance, constructed via the resource.
1936+
Union[job.CopyJob, job.ExtractJob, job.LoadJob, job.QueryJob, job.UnknownJob]:
1937+
The job instance, constructed via the resource.
19361938
"""
19371939
config = resource.get("configuration", {})
19381940
if "load" in config:
@@ -2064,7 +2066,8 @@ def get_job(
20642066
before using ``retry``.
20652067
20662068
Returns:
2067-
Job instance, based on the resource returned by the API.
2069+
Union[job.LoadJob, job.CopyJob, job.ExtractJob, job.QueryJob, job.UnknownJob]:
2070+
Job instance, based on the resource returned by the API.
20682071
"""
20692072
extra_params = {"projection": "full"}
20702073

@@ -3954,12 +3957,13 @@ def _schema_to_json_file_object(self, schema_list, file_obj):
39543957
"""
39553958
json.dump(schema_list, file_obj, indent=2, sort_keys=True)
39563959

3957-
def schema_from_json(self, file_or_path: "PathType"):
3960+
def schema_from_json(self, file_or_path: "PathType") -> List[SchemaField]:
39583961
"""Takes a file object or file path that contains json that describes
39593962
a table schema.
39603963
39613964
Returns:
3962-
List of schema field objects.
3965+
List[SchemaField]:
3966+
List of :class:`~google.cloud.bigquery.schema.SchemaField` objects.
39633967
"""
39643968
if isinstance(file_or_path, io.IOBase):
39653969
return self._schema_from_json_file_object(file_or_path)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy