10BC0 Typing of timeout · Issue #1545 · googleapis/python-bigquery · GitHub
[go: up one dir, main page]

Skip to content

Typing of timeout #1545

@boennecd

Description

@boennecd

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,

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

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.priority: p2Moderately-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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0