[schema] use classmethod decorator
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 08 Oct 2015 13:45:00 +0200
changeset 10797 b4f8c0b98c29
parent 10796 26a36c2a5fbd
child 10798 3f24adbf971a
[schema] use classmethod decorator
schema.py
--- a/schema.py	Fri Oct 16 16:44:36 2015 +0200
+++ b/schema.py	Thu Oct 08 13:45:00 2015 +0200
@@ -1207,11 +1207,11 @@
         return ';%s;%s\n%s' % (','.join(sorted(self.mainvars)), self.expression,
                                self.msg or '')
 
+    @classmethod
     def deserialize(cls, value):
         value, msg = value.split('\n', 1)
         _, mainvars, expression = value.split(';', 2)
         return cls(expression, mainvars, msg)
-    deserialize = classmethod(deserialize)
 
     def repo_check(self, session, eidfrom, rtype, eidto=None):
         """raise ValidationError if the relation doesn't satisfy the constraint