Skip to content

Commit

Permalink
Add WithMeta.__repr__() method
Browse files Browse the repository at this point in the history
Provides better printing of default options.
  • Loading branch information
johnomotani committed May 5, 2020
1 parent b2c47cd commit b85da95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optionsfactory/withmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def __eq__(self, other):
)

def __str__(self):
return self.__repr__()

def __repr__(self):
return (
f"WithMeta({self.value}, doc={self.doc}, value_type={self.value_type}), "
f"allowed={self.allowed}, check_all={self.check_all}, "
Expand Down

0 comments on commit b85da95

Please sign in to comment.