Hi all, On 21 juillet 21:38, Klaus Foerster wrote: > What I wanted however is to have lines which are not too long. > They look ugly depending on the source code editor being used. > Not knowing who'll review my code I'd like to have code not > exceeding 80 characters per line in length > > If I break the line with a backslash like: > i_want_to_mask_this_warning = value_with_long_name + \ > value_with_long_name # pylint: disable=W0612,C0301 > > then the W0612 will NOT be ignored. > > Is there anybody from Logilab listening who could > comment how difficult it would be to? > > - ignore one line warnings for source code lines separated with a '\' > - introduce a new pragma, which will ignore the next statement
The pb is that multi-lines statements are somewhat tricky to detect, since in most case that information get lost by the python parser. Or is not easy to detect. Could you create a ticket on pylint's tracker for your case ? IMO we should first try to fix message control directive with multi-lines statement, and if we don't reach an acceptable solution, then introduce a new directive or a similar alternative (which I would like to avoid). > I love pylint (much better than pychecker), but still try to find ways > to NOT make my code less readble in order to satisfy pylint. You're definitly right here. -- 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 [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
