Skip to content

Commit

Permalink
#236 - Long output when printing type
Browse files Browse the repository at this point in the history
- Add __str__ to type and feature
  • Loading branch information
jcklie committed Nov 15, 2021
1 parent ee4dbfc commit c94ca53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cassis/typesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ def __ne__(self, other):
def __lt__(self, other):
return self.name < other.name

def __str__(self):
return f"Feature(name={self.name})"


@attr.s(slots=True, hash=False, eq=True)
class Type:
Expand Down Expand Up @@ -589,6 +592,9 @@ def __hash__(self):
def __eq__(self, other):
return self.name == other.name

def __str__(self):
return f"Type(name={self.name})"


class TypeSystem:
def __init__(self, add_document_annotation_type: bool = True):
Expand Down

0 comments on commit c94ca53

Please sign in to comment.