@@ -327,7 +327,8 @@ def get_service_account_email(
327
327
before using ``retry``.
328
328
329
329
Returns:
330
- str: service account email address
330
+ str:
331
+ service account email address
331
332
332
333
Example:
333
334
@@ -1932,7 +1933,8 @@ def job_from_resource(
1932
1933
resource (Dict): one job resource from API response
1933
1934
1934
1935
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.
1936
1938
"""
1937
1939
config = resource .get ("configuration" , {})
1938
1940
if "load" in config :
@@ -2064,7 +2066,8 @@ def get_job(
2064
2066
before using ``retry``.
2065
2067
2066
2068
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.
2068
2071
"""
2069
2072
extra_params = {"projection" : "full" }
2070
2073
@@ -3954,12 +3957,13 @@ def _schema_to_json_file_object(self, schema_list, file_obj):
3954
3957
"""
3955
3958
json .dump (schema_list , file_obj , indent = 2 , sort_keys = True )
3956
3959
3957
- def schema_from_json (self , file_or_path : "PathType" ):
3960
+ def schema_from_json (self , file_or_path : "PathType" ) -> List [ SchemaField ] :
3958
3961
"""Takes a file object or file path that contains json that describes
3959
3962
a table schema.
3960
3963
3961
3964
Returns:
3962
- List of schema field objects.
3965
+ List[SchemaField]:
3966
+ List of :class:`~google.cloud.bigquery.schema.SchemaField` objects.
3963
3967
"""
3964
3968
if isinstance (file_or_path , io .IOBase ):
3965
3969
return self ._schema_from_json_file_object (file_or_path )
0 commit comments