p8p
authorEmmanuel Garette <egarette@cadoles.com>
Mon, 20 Jan 2014 13:58:48 +0000 (14:58 +0100)
committerEmmanuel Garette <egarette@cadoles.com>
Mon, 20 Jan 2014 13:58:48 +0000 (14:58 +0100)
tiramisu/option.py
tiramisu/storage/sqlalchemy/option.py

index b6e01e8..a295737 100644 (file)
@@ -35,7 +35,6 @@ from tiramisu.autolib import carry_out_calculation
 
 #FIXME : need storage...
 from tiramisu.storage.sqlalchemy.option import StorageBase, StorageOptionDescription
-from sqlalchemy.ext.declarative import declarative_base, declared_attr
 
 name_regexp = re.compile(r'^\d+')
 forbidden_names = ('iter_all', 'iter_group', 'find', 'find_first',
@@ -56,6 +55,8 @@ def valid_name(name):
         return False
 #____________________________________________________________
 #
+
+
 class Base(StorageBase):
     def __init__(self, name, doc, default=None, default_multi=None,
                  requires=None, multi=False, callback=None,
@@ -1281,7 +1282,6 @@ class OptionDescription(BaseOption, StorageOptionDescription):
                         self._cache_consistencies[opt] = tuple(cons)
                 self._readonly = True
 
-
     # ____________________________________________________________
     def impl_set_group_type(self, group_type):
         """sets a given group object to an OptionDescription
index b408daa..9d56607 100644 (file)
@@ -17,8 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 # ____________________________________________________________
-from tiramisu.setting import multitypes
-
+from tiramisu.i18n import _
 
 from sqlalchemy.ext.declarative import declarative_base, declared_attr
 from sqlalchemy import create_engine, Column, Integer, String, Boolean, \
@@ -38,6 +37,7 @@ require_table = Table('require', SqlAlchemyBase.metadata,
                       Column('right_id', Integer, ForeignKey('baseoption.id'))
                       )
 
+
 class _RequireExpected(SqlAlchemyBase):
     __tablename__ = 'expected'
     id = Column(Integer, primary_key=True)
@@ -218,12 +218,13 @@ class _Base(SqlAlchemyBase):
 
     def _add_callback(self, key, values):
         self._callback_params.append(_CallbackParam(key, values))
-        
+
     def _add_validator(self, key, values):
         self._validator_params.append(_CallbackParam(key, values))
 
     def _add_consistency(self, func, all_cons_opts):
         _Consistency(func, all_cons_opts)
+
     # ____________________________________________________________
     # information
     def impl_set_information(self, key, value):