On 08 février 21:00, Peter Hammond wrote: > Hi, Hi Peter,
> I tried sending this before, but it I accidentally used HTML and it > looks like it got stripped. See if this works better... > > I have been seeing lots of R0903 "too few public methods" with > classes that legitimately have none - context managers mostly. I > have implemented a fix that suppresses that warning when it detects > a well-formed set of __x__ methods, and as a by-product can warn > when a set is only partly implemented. The diff is below. Hope this > is the right procedure for offering a patch, and hope it meets the > grade. Very sorry for a so late answer. Sorting my mailbox, I've discovered your email back... I've created a ticket for your patch [1] and turned it into a "regular" changeset so it can go in the review process. I've made some small changes to it: * removed __iter__ from the container protocol, as it should be part of another protocol (iterable), and introduce too many false positives (think to file for instance) * added ChangeLog entry * a bit of cosmetic * nicer output * fixed a test broken by this new check [1] https://www.logilab.org/ticket/104420 Thank you very much for your contribution and sorry again for forgetting it for so long. -- Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (09.54.03.55.76) 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 [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
