Skip to content

Commit

Permalink
docs: add/reformat return types for cloud RAD docs (#1582)
Browse files Browse the repository at this point in the history
* docs: add/reformat return types for cloud RAD docs

* fix typos
  • Loading branch information
leahecole committed Jun 9, 2023
1 parent 63ba4a1 commit 6efdce1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions google/cloud/bigquery/client.py
Expand Up @@ -327,7 +327,8 @@ def get_service_account_email(
before using ``retry``.
Returns:
str: service account email address
str:
service account email address
Example:
Expand Down Expand Up @@ -1932,7 +1933,8 @@ def job_from_resource(
resource (Dict): one job resource from API response
Returns:
The job instance, constructed via the resource.
Union[job.CopyJob, job.ExtractJob, job.LoadJob, job.QueryJob, job.UnknownJob]:
The job instance, constructed via the resource.
"""
config = resource.get("configuration", {})
if "load" in config:
Expand Down Expand Up @@ -2064,7 +2066,8 @@ def get_job(
before using ``retry``.
Returns:
Job instance, based on the resource returned by the API.
Union[job.LoadJob, job.CopyJob, job.ExtractJob, job.QueryJob, job.UnknownJob]:
Job instance, based on the resource returned by the API.
"""
extra_params = {"projection": "full"}

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

def schema_from_json(self, file_or_path: "PathType"):
def schema_from_json(self, file_or_path: "PathType") -> List[SchemaField]:
"""Takes a file object or file path that contains json that describes
a table schema.
Returns:
List of schema field objects.
List[SchemaField]:
List of :class:`~google.cloud.bigquery.schema.SchemaField` objects.
"""
if isinstance(file_or_path, io.IOBase):
return self._schema_from_json_file_object(file_or_path)
Expand Down

0 comments on commit 6efdce1

Please sign in to comment.