Title: Allow `DatasetListItem` in `Client.delete_dataset` types · Issue #995 · googleapis/python-bigquery · GitHub
Open Graph Title: Allow `DatasetListItem` in `Client.delete_dataset` types · Issue #995 · googleapis/python-bigquery
X Title: Allow `DatasetListItem` in `Client.delete_dataset` types · Issue #995 · googleapis/python-bigquery
Description: 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) def cleanup_datasets(bigque...
Open Graph Description: 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", a...
X Description: 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="sessio...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/995
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow `DatasetListItem` in `Client.delete_dataset` types","articleBody":"https://app.circleci.com/pipelines/github/tswast/python-bigquery-pandas/217/workflows/38a35d17-9e68-48b3-b17a-b683e4ab5a52/jobs/1308\r\n\r\nI expected this code to work:\r\n\r\n```python\r\n @pytest.fixture(scope=\"session\", autouse=True)\r\n def cleanup_datasets(bigquery_client: bigquery.Client):\r\n for dataset in bigquery_client.list_datasets():\r\n if prefixer.should_cleanup(dataset.dataset_id):\r\n bigquery_client.delete_dataset(\r\n\u003e dataset, delete_contents=True, not_found_ok=True\r\n )\r\n```\r\n\r\nBut I get\r\n\r\n```\r\nif not isinstance(dataset, (Dataset, DatasetReference)):\r\n\u003e raise TypeError(\"dataset must be a Dataset or a DatasetReference\")\r\nE TypeError: dataset must be a Dataset or a DatasetReference\r\n\r\n/opt/conda/envs/test-environment/lib/python3.7/site-packages/google/cloud/bigquery/client.py:740: TypeError\r\n```\r\n\r\nSimilarly, we should check `delete_table`. I think it accepts `TableListItem`, but this is not reflected in the type annotations.\r\n\r\n","author":{"url":"https://github.com/tswast","@type":"Person","name":"tswast"},"datePublished":"2021-09-29T22:20:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/995/python-bigquery/issues/995"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d9d2176a-2e07-70ef-5b67-f41a3309b88e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D36A:3E67A5:F05D0A:14ECAC3:6A4E8BBD |
| html-safe-nonce | a849d56ced7f47967756618d593c75beee2f8fb41fc78d432e384f8ff444ccca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzZBOjNFNjdBNTpGMDVEMEE6MTRFQ0FDMzo2QTRFOEJCRCIsInZpc2l0b3JfaWQiOiIxOTQ1MDMzMDYwNTQ3MjAxOTgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e74cb42f3282fad6e2c473db99abfae980d61099c60eeb286aceb333c2756d6f |
| hovercard-subject-tag | issue:1011497409 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d3328c3302a23b721011d6113207197d168a68b44aa4d1b287c0c0421a34781/googleapis/python-bigquery/issues/995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d3328c3302a23b721011d6113207197d168a68b44aa4d1b287c0c0421a34781/googleapis/python-bigquery/issues/995 |
| og:image:alt | 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", a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tswast |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width