Skip to content

Commit

Permalink
Merge pull request #242 from bdowling/fix_model_repr
Browse files Browse the repository at this point in the history
Change model repr() to return additionalProperties
  • Loading branch information
sjaensch authored Jan 31, 2018
2 parents f91de2c + 488c9fe commit 0bdda91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bravado_core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ def __dir__(self):
return sorted(self.__dict.keys())

def __repr__(self):
"""Return properties (including additional)."""
s = [
"{0}={1!r}".format(attr_name, self[attr_name])
for attr_name in sorted(self._properties.keys())
for attr_name in sorted(self.__dict.keys())
if attr_name in self
]
return "{0}({1})".format(self.__class__.__name__, ', '.join(s))
Expand Down

0 comments on commit 0bdda91

Please sign in to comment.