Skip to content

Commit

Permalink
fix: correct type checking (#1848)
Browse files Browse the repository at this point in the history
Correct the way we check whether `self._done_timeout` is an instance of `object` class or not.

Fixes #1838 🦕
  • Loading branch information
Linchin committed Mar 11, 2024
1 parent 641a712 commit 2660dbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/bigquery/job/query.py
Expand Up @@ -1409,9 +1409,9 @@ def _reload_query_results(
# Python_API_core, as part of a major rewrite of the deadline, timeout,
# retry process sets the timeout value as a Python object().
# Our system does not natively handle that and instead expects
# either none or a numeric value. If passed a Python object, convert to
# either None or a numeric value. If passed a Python object, convert to
# None.
if isinstance(self._done_timeout, object): # pragma: NO COVER
if type(self._done_timeout) is object: # pragma: NO COVER
self._done_timeout = None

if self._done_timeout is not None: # pragma: NO COVER
Expand Down

0 comments on commit 2660dbd

Please sign in to comment.