Skip to content

Commit

Permalink
Makes TimePartitioning printable representation evaluable
Browse files Browse the repository at this point in the history
  • Loading branch information
francois-baptiste authored and François BAPTISTE committed May 18, 2020
1 parent 23a173b commit cf848fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions google/cloud/bigquery/table.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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))


Expand Down

0 comments on commit cf848fd

Please sign in to comment.