Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add DatasetListItem type #1017

Merged
merged 2 commits into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def _dataset_from_arg(self, dataset):

def create_dataset(
self,
dataset: Union[str, Dataset, DatasetReference],
dataset: Union[str, Dataset, DatasetReference, DatasetListItem],
exists_ok: bool = False,
retry: retries.Retry = DEFAULT_RETRY,
timeout: float = DEFAULT_TIMEOUT,
Expand Down Expand Up @@ -679,7 +679,7 @@ def create_routine(

def create_table(
self,
table: Union[str, Table, TableReference],
table: Union[str, Table, TableReference, TableListItem],
exists_ok: bool = False,
retry: retries.Retry = DEFAULT_RETRY,
timeout: float = DEFAULT_TIMEOUT,
Expand All @@ -693,6 +693,7 @@ def create_table(
table (Union[ \
google.cloud.bigquery.table.Table, \
google.cloud.bigquery.table.TableReference, \
google.cloud.bigquery.table.TableListItem, \
str, \
]):
A :class:`~google.cloud.bigquery.table.Table` to create.
Expand Down Expand Up @@ -1295,7 +1296,7 @@ def update_table(

def list_models(
self,
dataset: Union[Dataset, DatasetReference, str],
dataset: Union[Dataset, DatasetReference, DatasetListItem, str],
max_results: int = None,
page_token: str = None,
retry: retries.Retry = DEFAULT_RETRY,
Expand Down Expand Up @@ -1372,7 +1373,7 @@ def api_request(*args, **kwargs):

def list_routines(
self,
dataset: Union[Dataset, DatasetReference, str],
dataset: Union[Dataset, DatasetReference, DatasetListItem, str],
max_results: int = None,
page_token: str = None,
retry: retries.Retry = DEFAULT_RETRY,
Expand Down Expand Up @@ -1449,7 +1450,7 @@ def api_request(*args, **kwargs):

def list_tables(
self,
dataset: Union[Dataset, DatasetReference, str],
dataset: Union[Dataset, DatasetReference, DatasetListItem, str],
max_results: int = None,
page_token: str = None,
retry: retries.Retry = DEFAULT_RETRY,
Expand Down Expand Up @@ -1525,7 +1526,7 @@ def api_request(*args, **kwargs):

def delete_dataset(
self,
dataset: Union[Dataset, DatasetReference, str],
dataset: Union[Dataset, DatasetReference, DatasetListItem, str],
delete_contents: bool = False,
retry: retries.Retry = DEFAULT_RETRY,
timeout: float = DEFAULT_TIMEOUT,
Expand Down