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

AllowDatasetListItem inClient.delete_dataset types #995

Closed
Assignees
steffnay
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
@tswast

Description

@tswast

https://app.circleci.com/pipelines/github/tswast/python-bigquery-pandas/217/workflows/38a35d17-9e68-48b3-b17a-b683e4ab5a52/jobs/1308

I expected this code to work:

@pytest.fixture(scope="session",autouse=True)defcleanup_datasets(bigquery_client:bigquery.Client):fordatasetinbigquery_client.list_datasets():ifprefixer.should_cleanup(dataset.dataset_id):bigquery_client.delete_dataset(>dataset,delete_contents=True,not_found_ok=True                )

But I get

if not isinstance(dataset, (Dataset, DatasetReference)):>           raise TypeError("dataset must be a Dataset or a DatasetReference")E           TypeError: dataset must be a Dataset or a DatasetReference/opt/conda/envs/test-environment/lib/python3.7/site-packages/google/cloud/bigquery/client.py:740: TypeError

Similarly, we should checkdelete_table. I think it acceptsTableListItem, but this is not reflected in the type annotations.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp