Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79d8c61

Browse files
docs(bigquery): consistent use of optional keyword (#153)
* docs(bigquery): consistent use of optional keyword* docs(bigquery): nit
1 parenta2d5ce9 commit79d8c61

File tree

12 files changed

+392
-413
lines changed

12 files changed

+392
-413
lines changed

‎google/cloud/bigquery/_helpers.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,16 +471,16 @@ def _get_sub_prop(container, keys, default=None):
471471
472472
This method works like ``dict.get(key)``, but for nested values.
473473
474-
Arguments:
474+
Args:
475475
container (Dict):
476476
A dictionary which may contain other dictionaries as values.
477477
keys (Iterable):
478478
A sequence of keys to attempt to get the value for. Each item in
479479
the sequence represents a deeper nesting. The first key is for
480480
the top level. If there is a dictionary there, the second key
481481
attempts to get the value within that, and so on.
482-
default (object):
483-
(Optional)Value to returned if any of the keys are not found.
482+
default (Optional[object]):
483+
Value to returned if any of the keys are not found.
484484
Defaults to ``None``.
485485
486486
Examples:
@@ -514,7 +514,7 @@ def _get_sub_prop(container, keys, default=None):
514514
def_set_sub_prop(container,keys,value):
515515
"""Set a nested value in a dictionary.
516516
517-
Arguments:
517+
Args:
518518
container (Dict):
519519
A dictionary which may contain other dictionaries as values.
520520
keys (Iterable):
@@ -557,7 +557,7 @@ def _set_sub_prop(container, keys, value):
557557
def_del_sub_prop(container,keys):
558558
"""Remove a nested key fro a dictionary.
559559
560-
Arguments:
560+
Args:
561561
container (Dict):
562562
A dictionary which may contain other dictionaries as values.
563563
keys (Iterable):

‎google/cloud/bigquery/_http.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Connection(_http.JSONConnection):
2525
Args:
2626
client (google.cloud.bigquery.client.Client): The client that owns the current connection.
2727
28-
client_info (google.api_core.client_info.ClientInfo):(Optional) instance used to generate user agent.
28+
client_info (Optional[google.api_core.client_info.ClientInfo]):Instance used to generate user agent.
2929
"""
3030

3131
DEFAULT_API_ENDPOINT="https://bigquery.googleapis.com"

‎google/cloud/bigquery/_pandas_helpers.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,9 @@ def dataframe_to_parquet(dataframe, bq_schema, filepath, parquet_compression="SN
472472
columns in the DataFrame.
473473
filepath (str):
474474
Path to write Parquet file to.
475-
parquet_compression (str):
476-
(optional) The compression codec to use by the the
477-
``pyarrow.parquet.write_table`` serializing method. Defaults to
478-
"SNAPPY".
475+
parquet_compression (Optional[str]):
476+
The compression codec to use by the the ``pyarrow.parquet.write_table``
477+
serializing method. Defaults to "SNAPPY".
479478
https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_table.html#pyarrow-parquet-write-table
480479
"""
481480
ifpyarrowisNone:

‎google/cloud/bigquery/client.py‎

Lines changed: 216 additions & 233 deletions
Large diffs are not rendered by default.

‎google/cloud/bigquery/dataset.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ def from_string(cls, dataset_id, default_project=None):
295295
A dataset ID in standard SQL format. If ``default_project``
296296
is not specified, this must include both the project ID and
297297
the dataset ID, separated by ``.``.
298-
default_project (str):
299-
Optional.The project ID to use when ``dataset_id`` does not
300-
include aproject ID.
298+
default_project (Optional[str]):
299+
The project ID to use when ``dataset_id`` does not include a
300+
project ID.
301301
302302
Returns:
303303
DatasetReference:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp