From c236fdb81b1249e1bcab0a027af81c987f96a60b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 11 May 2020 20:31:07 -0700 Subject: [PATCH] Add __repr__ methods to most objects` These are closer to what __str__ should be and will likely change in the future. --- masque/label.py | 4 ++++ masque/pattern.py | 4 ++++ masque/repetition.py | 11 +++++++++++ masque/shapes/arc.py | 7 +++++++ masque/shapes/circle.py | 4 ++++ masque/shapes/ellipse.py | 6 ++++++ masque/shapes/path.py | 6 ++++++ masque/shapes/polygon.py | 6 ++++++ masque/shapes/text.py | 7 +++++++ masque/subpattern.py | 9 +++++++++ 10 files changed, 64 insertions(+) diff --git a/masque/label.py b/masque/label.py index 972370b..e09c60e 100644 --- a/masque/label.py +++ b/masque/label.py @@ -170,3 +170,7 @@ class Label: object.__setattr__(self, 'locked', False) self.offset.flags.writeable = True return self + + def __repr__(self) -> str: + locked = ' L' if self.locked else '' + return f'