From da8f29989667447c4b6bdd9294fd2da046fd26df Mon Sep 17 00:00:00 2001 From: Tim Swena Date: Fri, 27 Dec 2024 15:22:31 -0600 Subject: [PATCH] fix pytype --- google/cloud/bigquery/schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigquery/schema.py b/google/cloud/bigquery/schema.py index d37019a03..b062396cf 100644 --- a/google/cloud/bigquery/schema.py +++ b/google/cloud/bigquery/schema.py @@ -16,7 +16,7 @@ import collections import enum -from typing import Any, Dict, Iterable, Optional, Union +from typing import Any, cast, Dict, Iterable, Optional, Union from google.cloud.bigquery import _helpers from google.cloud.bigquery import standard_sql @@ -243,7 +243,7 @@ def field_type(self): type_ = self._properties.get("type") if type_ is None: # Shouldn't happen, but some unit tests do this. return None - return type_.upper() + return cast(str, type_).upper() @property def mode(self): @@ -252,7 +252,7 @@ def mode(self): See: https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#TableFieldSchema.FIELDS.mode """ - return self._properties.get("mode", "NULLABLE").upper() + return cast(str, self._properties.get("mode", "NULLABLE")).upper() @property def is_nullable(self):