On 02 février 18:42, Diez B. Roggisch wrote: Hi,
> Sorry if this appears twice, I messed up the first time. It did appears the first time. > I think I spotted a bug in pylint (0.18) inside the typechecker module: in > the > constructor, this code > > > self.generated_members = list(self.config.generated_members) > if self.config.zope: > self.generated_members.\ > extend(('REQUEST', 'acl_users', 'aq_parent')) > > > So it appears that the self.generated_members is extended over the > configuration. > > However, when later used, the code reads > > if node.attrname in self.config.generated_members: > > So... the modified list is ignored. I didn't find a way to file the ticket. Sorry, I don't see the bug here. The list is modified in-place, so you should get the extended list. > Also, the documentation on how to configure pylint is very unclear to me. > Through a lot of tinkering, I came to my current .pylintrc, but I didn't find > a way to configure the above mentioned generated_members. use "pylint --generate-rcfile > .pylintrc" as a starting point. > And I wonder if there would be a way to enhance typechecker to allow plugins > to hook into it, so that I can provide the generated_members list on a more > fine-grained level. My actual use-case is Elixir Entity objects, that are > enriched after declaration & could benefit from such code. Of course I could > try & set the generated_members, but that's on a rather broad scope I'd say. Humm, I think you can write a checker that will get the typecheck checker and modify its generated_members attribute. Or you can also write your own checker subclassing the typecheck checker, disable the original one to use yours instead. -- Sylvain Thénault LOGILAB, Paris (France) Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations Développement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects