# HG changeset patch # User Sylvain Thénault # Date 1276070075 -7200 # Node ID 8af6623f3d4e8a28f3d1caf95ce594017e2ceba9 # Parent 59ceed788bdb70d47a00ca602b399c5c7836229b [pylint] fix detected name errors diff -r 59ceed788bdb -r 8af6623f3d4e devtools/__init__.py --- a/devtools/__init__.py Wed Jun 09 09:42:24 2010 +0200 +++ b/devtools/__init__.py Wed Jun 09 09:54:35 2010 +0200 @@ -249,7 +249,7 @@ """initialize a fresh sqlserver databse used for testing purpose""" if config.init_repository: from cubicweb.server import init_repository - init_repository(config, interactive=False, drop=True, vreg=vreg) + init_repository(config, interactive=False, drop=True) ### sqlite test database handling ############################################## diff -r 59ceed788bdb -r 8af6623f3d4e hooks/notification.py --- a/hooks/notification.py Wed Jun 09 09:42:24 2010 +0200 +++ b/hooks/notification.py Wed Jun 09 09:54:35 2010 +0200 @@ -188,7 +188,7 @@ except: # may raise an error during deletion process, for instance due to # missing required relation - title = '#%s' % eid + title = '#%s' % self.entity.eid self._cw.transaction_data.setdefault('pendingchanges', []).append( - ('delete_entity', (self.entity.eid, str(self.entity.e_schema), title))) + ('delete_entity', (self.entity.eid, self.entity.__regid__, title))) return True diff -r 59ceed788bdb -r 8af6623f3d4e server/checkintegrity.py --- a/server/checkintegrity.py Wed Jun 09 09:42:24 2010 +0200 +++ b/server/checkintegrity.py Wed Jun 09 09:54:35 2010 +0200 @@ -96,7 +96,7 @@ cursor = session.pool['system'] if not repo.system_source.dbhelper.has_fti_table(cursor): print 'no text index table' - dbhelper.init_fti(cursor) + repo.system_source.dbhelper.init_fti(cursor) repo.system_source.do_fti = True # ensure full-text indexation is activated etypes = set() for eschema in schema.entities(): diff -r 59ceed788bdb -r 8af6623f3d4e server/sources/storages.py --- a/server/sources/storages.py Wed Jun 09 09:42:24 2010 +0200 +++ b/server/sources/storages.py Wed Jun 09 09:54:35 2010 +0200 @@ -16,11 +16,12 @@ # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . """custom storages for the system source""" + from os import unlink, path as osp from yams.schema import role_name -from cubicweb import Binary +from cubicweb import Binary, ValidationError from cubicweb.server import hook def set_attribute_storage(repo, etype, attr, storage): @@ -157,7 +158,7 @@ fspath = uniquify_path(self.default_directory, '_'.join(basename)) if fspath is None: msg = entity._cw._('failed to uniquify path (%s, %s)') % ( - dirpath, '_'.join(basename)) + self.default_directory, '_'.join(basename)) raise ValidationError(entity.eid, {role_name(attr, 'subject'): msg}) return fspath diff -r 59ceed788bdb -r 8af6623f3d4e vregistry.py --- a/vregistry.py Wed Jun 09 09:42:24 2010 +0200 +++ b/vregistry.py Wed Jun 09 09:54:35 2010 +0200 @@ -29,9 +29,8 @@ current state (req, rset, row, col). At the end of the selection, if a appobject class has been found, an instance of this class is returned. The selector is instantiated at appobject registration - +""" -""" __docformat__ = "restructuredtext en" import sys diff -r 59ceed788bdb -r 8af6623f3d4e web/views/autoform.py --- a/web/views/autoform.py Wed Jun 09 09:42:24 2010 +0200 +++ b/web/views/autoform.py Wed Jun 09 09:54:35 2010 +0200 @@ -128,6 +128,7 @@ from logilab.common.deprecation import deprecated from cubicweb import typed_eid, neg_role, uilib +from cubicweb.vreg import classid from cubicweb.schema import display_name from cubicweb.view import EntityView from cubicweb.selectors import ( @@ -307,7 +308,7 @@ try: cls = self._cw.vreg['etypes'].etype_class(self.etype) except: - self.w(self._cw._('no such entity type %s') % etype) + self.w(self._cw._('no such entity type %s') % self.etype) return entity = cls(self._cw) entity.eid = self._cw.varmaker.next() @@ -733,7 +734,7 @@ try: srels_by_cat = self.srelations_by_category('generic', 'add', strict=True) warn('[3.6] %s: srelations_by_category is deprecated, use uicfg or ' - 'override editable_relations instead' % classid(form), + 'override editable_relations instead' % classid(self), DeprecationWarning) except AttributeError: srels_by_cat = self.editable_relations() diff -r 59ceed788bdb -r 8af6623f3d4e web/views/cwproperties.py --- a/web/views/cwproperties.py Wed Jun 09 09:42:24 2010 +0200 +++ b/web/views/cwproperties.py Wed Jun 09 09:54:35 2010 +0200 @@ -382,7 +382,7 @@ w(u'%s' % self.render_label(form, field)) error = form.field_error(field) if error: - w(u'%s' % err) + w(u'%s' % error) w(u'%s' % self.render_help(form, field)) w(u'
') w(field.render(form, self)) diff -r 59ceed788bdb -r 8af6623f3d4e web/views/treeview.py --- a/web/views/treeview.py Wed Jun 09 09:42:24 2010 +0200 +++ b/web/views/treeview.py Wed Jun 09 09:54:35 2010 +0200 @@ -15,9 +15,8 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . -"""Set of tree-building widgets, based on jQuery treeview plugin +"""Set of tree-building widgets, based on jQuery treeview plugin""" -""" __docformat__ = "restructuredtext en" from logilab.mtconverter import xml_escape