summaryrefslogtreecommitdiff
path: root/morphlib/morphologyfinder.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-30 18:47:43 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-09-28 16:51:51 +0000
commitc521d6fa5a8a18ce3ed420d475ef0a3cc7b51ee5 (patch)
tree26a905f38d625b35f3da798fff8ee7073b3dae3e /morphlib/morphologyfinder.py
parent54496d7d9b6d5e1c64c5c220ab2f280e0b9e84ec (diff)
downloadmorph-c521d6fa5a8a18ce3ed420d475ef0a3cc7b51ee5.tar.gz
Change how MorphologyLoader instances are created
Loading .morph files is becoming a bit more complicated, as we need to deal with the VERSION file, and possibly soon with a DEFAULTS file as well. The logic of loading and parsing .morph files is done either in the sourceresolver module, or the morphloader module. This change means that all users of the latter module can use the get hold of a MorphologyLoader instance with VERSION already parsed. If DEFAULTS is added then it is also simple to parse DEFAULTS. Change-Id: Ib33756e9dbd078e38f12dd7f776c89584b178959
Diffstat (limited to 'morphlib/morphologyfinder.py')
-rw-r--r--morphlib/morphologyfinder.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/morphlib/morphologyfinder.py b/morphlib/morphologyfinder.py
index 708c86a9..9184c160 100644
--- a/morphlib/morphologyfinder.py
+++ b/morphlib/morphologyfinder.py
@@ -33,16 +33,8 @@ class MorphologyFinder(object):
self.gitdir = gitdir
self.ref = ref
- def read_morphology(self, filename):
- '''Return the un-parsed text of a morphology.
-
- For the given morphology name, locate and return the contents
- of the morphology as a string.
-
- Parsing of this morphology into a form useful for manipulating
- is handled by the MorphologyLoader class.
-
- '''
+ def read_file(self, filename):
+ '''Return the text of a file inside the Git repo.'''
return self.gitdir.read_file(filename, self.ref)
def list_morphologies(self):