Skip to content

Commit af02937

Browse files
committed
fixes formatting
1 parent 7c08ca8 commit af02937

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

google/cloud/bigquery/schema.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ def from_api_repr(cls, resource: dict) -> SerDeInfo:
917917
return config
918918

919919

920-
class Schema:
920+
class Schema(collections.UserList):
921921
# TODO docstrings and type hints
922922
def __init__(self, fields=None, foreign_type_info=None):
923923
self._properties = {}
@@ -944,6 +944,15 @@ def _fields(self, value: list) -> None:
944944
value = _isinstance_or_raise(value, list, none_allowed=True)
945945
self._properties["_fields"] = value
946946

947+
@property
948+
def data(self):
949+
return self._properties.get("_fields")
950+
951+
@data.setter
952+
def data(self, value: list):
953+
# for simplicity, no validation in this proof of concept
954+
self._properties["_fields"] = value
955+
947956
def __len__(self):
948957
return len(self._fields)
949958

0 commit comments

Comments
 (0)