diff --git a/google/cloud/bigquery/client.py b/google/cloud/bigquery/client.py index 11cceea42..29eec3eae 100644 --- a/google/cloud/bigquery/client.py +++ b/google/cloud/bigquery/client.py @@ -253,7 +253,7 @@ def __init__( bq_host = _get_bigquery_host() kw_args["api_endpoint"] = bq_host if bq_host != _DEFAULT_HOST else None if client_options: - if type(client_options) == dict: + if isinstance(client_options, dict): client_options = google.api_core.client_options.from_dict( client_options ) diff --git a/google/cloud/bigquery/job/query.py b/google/cloud/bigquery/job/query.py index 82501fe0c..1ade5b89f 100644 --- a/google/cloud/bigquery/job/query.py +++ b/google/cloud/bigquery/job/query.py @@ -1382,7 +1382,7 @@ def _reload_query_results( # Our system does not natively handle that and instead expects # either none or a numeric value. If passed a Python object, convert to # None. - if type(self._done_timeout) == object: # pragma: NO COVER + if isinstance(self._done_timeout, object): # pragma: NO COVER self._done_timeout = None if self._done_timeout is not None: