Skip to content

Commit da8f299

Browse files
committed
fix pytype
1 parent 602effa commit da8f299

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

google/cloud/bigquery/schema.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import collections
1818
import enum
19-
from typing import Any, Dict, Iterable, Optional, Union
19+
from typing import Any, cast, Dict, Iterable, Optional, Union
2020

2121
from google.cloud.bigquery import _helpers
2222
from google.cloud.bigquery import standard_sql
@@ -243,7 +243,7 @@ def field_type(self):
243243
type_ = self._properties.get("type")
244244
if type_ is None: # Shouldn't happen, but some unit tests do this.
245245
return None
246-
return type_.upper()
246+
return cast(str, type_).upper()
247247

248248
@property
249249
def mode(self):
@@ -252,7 +252,7 @@ def mode(self):
252252
See:
253253
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#TableFieldSchema.FIELDS.mode
254254
"""
255-
return self._properties.get("mode", "NULLABLE").upper()
255+
return cast(str, self._properties.get("mode", "NULLABLE")).upper()
256256

257257
@property
258258
def is_nullable(self):

0 commit comments

Comments
 (0)