Skip to content

Commit

Permalink
Removed treant counters for Group __repr__
Browse files Browse the repository at this point in the history
Not too hard to add custom Treants, but also not really necessary. May
re-add later.
  • Loading branch information
dotsdl committed Sep 17, 2015
1 parent d3bba3c commit 13da411
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions datreant/treants.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,23 +529,9 @@ def __repr__(self):
treants = members.count('Treant')
groups = members.count('Group')

# TODO: needs to work for any type of Treant subclasses
out = "<Group: '{}'".format(self.name, len(members))
if members:
out = out + " | {} Members: ".format(len(members))
if treants:
if treants == 1:
out = out + "{} Treant".format(treants)
elif treants > 1:
out = out + "{} Treants".format(treants)
if groups:
out = out + ", "
if groups:
if groups == 1:
out = out + "{} Group".format(groups)
elif groups > 1:
out = out + "{} Groups".format(groups)

out = out + " | {} Members".format(len(members))
out = out + ">"

return out
Expand Down

0 comments on commit 13da411

Please sign in to comment.