diff --git a/google/cloud/bigquery/client.py b/google/cloud/bigquery/client.py index f64a81741..b4783fc56 100644 --- a/google/cloud/bigquery/client.py +++ b/google/cloud/bigquery/client.py @@ -1895,7 +1895,7 @@ def _get_query_results( extra_params: Dict[str, Any] = {"maxResults": 0} if timeout is not None: - if type(timeout) == object: + if not isinstance(timeout, (int, float)): timeout = _MIN_GET_QUERY_RESULTS_TIMEOUT else: timeout = max(timeout, _MIN_GET_QUERY_RESULTS_TIMEOUT) @@ -3927,7 +3927,7 @@ def _list_rows_from_query_results( } if timeout is not None: - if type(timeout) == object: + if not isinstance(timeout, (int, float)): timeout = _MIN_GET_QUERY_RESULTS_TIMEOUT else: timeout = max(timeout, _MIN_GET_QUERY_RESULTS_TIMEOUT) diff --git a/noxfile.py b/noxfile.py index 3c9ba5eb5..93616485f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -375,9 +375,7 @@ def lint(session): serious code quality issues. """ - # Pin flake8 to 6.0.0 - # See https://github.com/googleapis/python-bigquery/issues/1635 - session.install("flake8==6.0.0", BLACK_VERSION) + session.install("flake8", BLACK_VERSION) session.install("-e", ".") session.run("flake8", os.path.join("google", "cloud", "bigquery")) session.run("flake8", "tests")