From 2660dbd4821a89a1e20e3e1541504a409f1979aa Mon Sep 17 00:00:00 2001 From: Lingqing Gan Date: Mon, 11 Mar 2024 10:04:17 -0700 Subject: [PATCH] fix: correct type checking (#1848) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct the way we check whether `self._done_timeout` is an instance of `object` class or not. Fixes #1838 🦕 --- google/cloud/bigquery/job/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cloud/bigquery/job/query.py b/google/cloud/bigquery/job/query.py index e45a46894..83d2751ce 100644 --- a/google/cloud/bigquery/job/query.py +++ b/google/cloud/bigquery/job/query.py @@ -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