[cleanup] nicer imports
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Tue, 28 Jul 2009 18:36:32 +0200
changeset 2531 531ea4e7013e
parent 2530 3cd117ecc3a8
child 2532 f7ca29d75183
[cleanup] nicer imports
schema.py
--- a/schema.py	Tue Jul 28 16:33:59 2009 +0200
+++ b/schema.py	Tue Jul 28 18:36:32 2009 +0200
@@ -17,11 +17,12 @@
 from logilab.common.deprecation import obsolete
 from logilab.common.compat import any
 
-from yams import BadSchemaDefinition, buildobjs as ybo, constraints
+from yams import BadSchemaDefinition, buildobjs as ybo
 from yams.schema import Schema, ERSchema, EntitySchema, RelationSchema
-from yams.constraints import BaseConstraint, StaticVocabularyConstraint
-from yams.reader import CONSTRAINTS, PyFileReader, SchemaLoader, \
-     obsolete as yobsolete, cleanup_sys_modules
+from yams.constraints import (BaseConstraint, StaticVocabularyConstraint,
+                              FormatConstraint)
+from yams.reader import (CONSTRAINTS, PyFileReader, SchemaLoader,
+                         obsolete as yobsolete, cleanup_sys_modules)
 
 from rql import parse, nodes, RQLSyntaxError, TypeResolverException
 
@@ -896,7 +897,7 @@
 PERM_USE_TEMPLATE_FORMAT = _('use_template_format')
 NEED_PERM_FORMATS = [_('text/cubicweb-page-template')]
 
-@monkeypatch(constraints.FormatConstraint)
+@monkeypatch(FormatConstraint)
 def vocabulary(self, entity=None, req=None):
     if req is None and entity is not None:
         req = entity.req