Skip to content

Commit

Permalink
Merge pull request #1572 from jakevdp/top-level-repr
Browse files Browse the repository at this point in the history
Truncate top-level chart repr
  • Loading branch information
jakevdp authored Jun 21, 2019
2 parents a3726f4 + 4d76152 commit d7a774a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions altair/vegalite/v3/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ def save(self, fp, format=None, override_data_transformer=True,
result = save(**kwds)
return result

# Fallback for when rendering fails; the full repr is too long to be
# useful in nearly all cases.
def __repr__(self):
return "alt.{}(...)".format(self.__class__.__name__)

# Layering and stacking
def __add__(self, other):
if not isinstance(other, TopLevelMixin):
Expand Down

0 comments on commit d7a774a

Please sign in to comment.