-
Notifications
You must be signed in to change notification settings - Fork 325
Fix: Update type hints for various BigQuery files #2206
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -518,23 +518,17 @@ def __init__(self): | |
| @property | ||
| def project(self): | ||
| """str: ID of the project containing the routine.""" | ||
| # TODO: The typehinting for this needs work. Setting this pragma to temporarily | ||
| # manage a pytype issue that came up in another PR. See Issue: #2132 | ||
| return self._properties["projectId"] # pytype: disable=typed-dict-error | ||
| return self._properties.get("projectId", "") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these be optional / return none as well?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these ( If we used Whereas with an empty string we would get: |
||
|
|
||
| @property | ||
| def dataset_id(self): | ||
| """str: ID of dataset containing the routine.""" | ||
| # TODO: The typehinting for this needs work. Setting this pragma to temporarily | ||
| # manage a pytype issue that came up in another PR. See Issue: #2132 | ||
| return self._properties["datasetId"] # pytype: disable=typed-dict-error | ||
| return self._properties.get("datasetId", "") | ||
|
|
||
| @property | ||
| def routine_id(self): | ||
| """str: The routine ID.""" | ||
| # TODO: The typehinting for this needs work. Setting this pragma to temporarily | ||
| # manage a pytype issue that came up in another PR. See Issue: #2132 | ||
| return self._properties["routineId"] # pytype: disable=typed-dict-error | ||
| return self._properties.get("routineId", "") | ||
|
|
||
| @property | ||
| def path(self): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be Optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this method call has a default value:
If you call
.get()you will get back theschemadict OR you will get back an emptydict, so I don't thinkOptionalapplies here.