diff --git a/google/cloud/bigquery/table.py b/google/cloud/bigquery/table.py index e66d24e74..2a287a046 100644 --- a/google/cloud/bigquery/table.py +++ b/google/cloud/bigquery/table.py @@ -2005,13 +2005,13 @@ class TimePartitioning(object): """ def __init__( - self, type_=None, field=None, expiration_ms=None, require_partition_filter=None + self, type=None, field=None, expiration_ms=None, require_partition_filter=None ): self._properties = {} - if type_ is None: + if type is None: self.type_ = TimePartitioningType.DAY else: - self.type_ = type_ + self.type_ = type if field is not None: self.field = field if expiration_ms is not None: @@ -2142,7 +2142,7 @@ def __hash__(self): return hash(self._key()) def __repr__(self): - key_vals = ["{}={}".format(key, val) for key, val in self._key()] + key_vals = ["{}={}".format(key, val.__repr__()) for key, val in self._key()] return "TimePartitioning({})".format(",".join(key_vals))