summaryrefslogtreecommitdiff
path: root/morphlib/source.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-03 09:45:43 +0000
committerRichard Maw <richard.maw@gmail.com>2014-09-17 15:51:10 +0000
commit776961cdf1890aaed5a64cf5afb067ee86e88a80 (patch)
tree00029c74df587536c41e3a70326cdad2a10b49d0 /morphlib/source.py
parent4d38f6189114367014794619ef1fcb79e984c484 (diff)
downloadmorph-776961cdf1890aaed5a64cf5afb067ee86e88a80.tar.gz
Add __repr__ method to Source and SplitRules
This helps debugging issues with rule matching, since SplitRules can be print-statemented
Diffstat (limited to 'morphlib/source.py')
-rw-r--r--morphlib/source.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/source.py b/morphlib/source.py
index 2dbabad1..d0f69a28 100644
--- a/morphlib/source.py
+++ b/morphlib/source.py
@@ -56,3 +56,6 @@ class Source(object):
return '%s|%s|%s' % (self.repo_name,
self.original_ref,
self.filename)
+
+ def __repr__(self): # pragma: no cover
+ return 'Source(%s)' % str(self)