On Mon, 2011-11-28 at 17:26 +0200, Alexander Bokovoy wrote:
> On Mon, 28 Nov 2011, Alexander Bokovoy wrote:
> > Hi,
> > Attached are fixes for ldap.LDAPObject.add_s(self, dn, modlist) uses
> > which now don't pass 'make-lint' on Fedora 16/Rawhide.
> > --
> > / Alexander Bokovoy
> > >From dd866262c98be779a094a617975145e2fb1e0dd1 Mon Sep 17 00:00:00 2001
> > From: Alexander Bokovoy <aboko...@redhat.com>
> > Date: Mon, 28 Nov 2011 14:21:17 +0200
> > Subject: [PATCH] Be more explicit when passing Entry class to
> > ldap.LDAPObject.add_s()
> > ldap.LDAPObject.add_s(self, dn, modlist) requires two positional arguments.
> > We used to pass our Entry class which implements dictionary access that
> > gives
> > proper way to pass the positional arguments, but PyLint in Fedora 16/Rawhide
> > became more strict about that and can't infer dictionary interface through
> > static checking.
> > Thus, we need to explicitly annotate dictionary passing with **entry syntax.
> > This has additional benefit to remind that we deal with multiple arguments
> > here.
> Self-NACK, doesn't really work this way. I'm still looking at better
> approach but intermediate solution is to use pylint hints.
> Conservative patch is attached.
What about other add_s(entry) calls? I see we call it this way on more
places, especially in replication.py:
$ git grep "add_s(e"
ipaserver/install/cainstance.py: ld.add_s(entry_dn, entry)
ipaserver/install/service.py: conn.add_s(entry) #pylint:
Should we patch ipa-2-1 branch as well? If we do another release for
F-16 we want to have pylint check clean. We would need a rebased patch
for ipa-2-1 branch in this case.
Freeipa-devel mailing list