Hey Vish, I may be missing something but when I test with pylint locally, I am using the pylintrc located in trunk. The only cleanup I am doing is derived directly from looking at the nova-pylint-errors job on Jenkins.
Alex -----Original Message----- From: "Vishvananda Ishaya" <[email protected]> Sent: Monday, June 6, 2011 11:42am To: "Alex Meade" <[email protected]> Cc: [email protected] Subject: Re: [Openstack] Jenkins - nova-pylint-errors Hey alex, Justin came up with a pretty reasonable set of defaults for pylint that tends to only show real error messages. It is the nova-pylint-errors job in jenkins. It looks like this error has already been removed from the list (although there is another one there about medatada #690) Perhaps you should start your cleanup by fixing the ones still showing up in that job rather than the default pylint output? Vish On Jun 6, 2011, at 6:08 AM, Alex Meade wrote: > I've been working on cleaning up pylint errors and have a concern regarding: > > E1101: %s %r has no %r member > Used when a variable is accessed for an unexistent member. > > 97 (59%) of the 169 errors in the nova pylint errors job on jenkins are of > the type E1101. 82/97 are located under the sqlalchemy directory. This is > (mostly) because pylint doesn't understand most of the ways classes and > functions in the database code are getting members even though they are by no > means incorrect. > > One example that pylint complains about is this: > > nova/db/sqlalchemy/api.py > > Class 'Network' has no 'fixed_ips' member > > 1322 @require_admin_context > 1323 def network_get_by_instance(_context, instance_id): > 1324 session = get_session() > 1325 rv = session.query(models.Network).\ > 1326 filter_by(deleted=False).\ > !!!!! 1327 join(models.Network.fixed_ips).\ > 1328 filter_by(instance_id=instance_id).\ > 1329 filter_by(deleted=False).\ > 1330 first() > > But Network does have the attribute fixed_ips because it is created here: > > nova/db/sqlalchemy/models.py > 536: network = relationship(Network, backref=backref('fixed_ips')) > > > What do you guys think about setting jenkins to ignore E1101 or at least > ignore it for nova/db/sqlalchemy? If we ever want to get our pylint errors > down to zero so we can start enforcing it, we need to either do something > like above or insert pylint ignore statements throughout all the code where > the error is not really an error. > > > _______________________________________________ > Mailing list: https://launchpad.net/~openstack > Post to : [email protected] > Unsubscribe : https://launchpad.net/~openstack > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

