-
Notifications
You must be signed in to change notification settings - Fork 323
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS type and version: MacOs
- Python version: 3.9.6
Steps to reproduce
This is fairly tiny and relates to a typing issue. timeout
is documented as Optional[float]
but only typed as float
. E.g.
timeout: float = None, |
python-bigquery/google/cloud/bigquery/job/query.py
Lines 1415 to 1419 in 0bf9546
timeout (Optional[float]): | |
The number of seconds to wait for the underlying HTTP transport | |
before using ``retry``. | |
If multiple requests are made under the hood, ``timeout`` | |
applies to each individual request. |
and also at
self, retry: "retries.Retry" = DEFAULT_RETRY, timeout: float = None |
python-bigquery/google/cloud/bigquery/job/base.py
Lines 892 to 896 in a2520ca
timeout (Optional[float]): | |
The number of seconds to wait for the underlying HTTP transport | |
before using ``retry``. | |
If multiple requests are made under the hood, ``timeout`` | |
applies to each individual request. |
The type check is ignored in both cases which may explain this?
def result( # type: ignore # (complaints about the overloaded signature) |
def result( # type: ignore # (signature complaint) |
This makes the functions slightly annoying to use if one passes an Optional[float]
on.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.