GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: add type hint for public methods by HemangChothani · Pull Request #445 · googleapis/python-bigquery
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Conversation
Contributor
Fixes #157
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
HemangChothani
commented
|
| from google.cloud.bigquery.table import TableReference | ||
| from google.cloud.bigquery.table import RowIterator | ||
|
|
||
| # Types needed only for Type Hints |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't see any reason to keep these in a separate location from the other imports. Let's put them in their respective groups.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| max_creation_time=None, | ||
| ): | ||
| project: str = None, | ||
| parent_job: Union[_AsyncJob, str] = None, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
parent_job is only relevant for queries, so I think we can put QueryJob here and avoid the use of a private type.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| table: Union[Table, TableReference, str], | ||
| rows: Union[Sequence[Tuple], Sequence[Dict]], | ||
| selected_fields: Sequence[SchemaField] = None, | ||
| **kwargs: dict, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why dict here and Dict below?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| permissions: Sequence[str], | ||
| retry: retries.Retry = DEFAULT_RETRY, | ||
| timeout: float = None, | ||
| ): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looking at the system tests, I believe the output for this method id Dict
python-bigquery/tests/system.py
Line 1645 in dbc68b3
| self.assertEqual(set(response["permissions"]), set(permissions)) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Bump, just checking the status of this? Generally speaking, though, type hints would be welcome, even though static type checks have not been added to Kokoro (yet). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Superseded by #613. (will also address the comments there) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
feat: add type hints to methods
There was an error while loading. Please reload this page.