From 8a8bbbfe37e59654b1066e3ca2adc3df5d182d8d Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Wed, 29 Feb 2012 08:06:28 -0600 Subject: [PATCH] Just use _transform instead of transform --- hyde/model.py | 6 +++--- hyde/tests/ext/test_tagger.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hyde/model.py b/hyde/model.py index cd68a76..3cda7b4 100644 --- a/hyde/model.py +++ b/hyde/model.py @@ -45,10 +45,10 @@ class Expando(object): Sets the expando attribute after transforming the value. """ - setattr(self, unicode(key).encode('utf-8'), self.transform(value)) + setattr(self, unicode(key).encode('utf-8'), self._transform(value)) - def transform(self, primitive): + def _transform(self, primitive): """ Creates an expando object, a sequence of expando objects or just returns the primitive based on the primitive's type. @@ -57,7 +57,7 @@ class Expando(object): return Expando(primitive) elif isinstance(primitive, (tuple, list, set, frozenset)): seq = type(primitive) - return seq(self.transform(attr) for attr in primitive) + return seq(self._transform(attr) for attr in primitive) else: return primitive diff --git a/hyde/tests/ext/test_tagger.py b/hyde/tests/ext/test_tagger.py index e23f70b..b9ff85d 100644 --- a/hyde/tests/ext/test_tagger.py +++ b/hyde/tests/ext/test_tagger.py @@ -34,7 +34,7 @@ class TestTagger(object): assert self.s.tagger.tags tags = self.s.tagger.tags.to_dict() - assert len(tags) == 5 + assert len(tags) == 6 for tag in ['sad', 'happy', 'angry', 'thoughts', 'events']: assert tag in tags