On Fri, Mar 29, 2013 at 6:30 PM, Sylvain Thénault < sylvain.thena...@logilab.fr> wrote:
> Hi Torsten, > > On 19 mars 22:15, Torsten Marek wrote: > > A collection of bugfixes and new warnings. No large changesets, the most > > interesting one is definitely warning_scopes.diff. > > nice series anyway. I've taken a look at it, do some minor modification. > See > comments below. All have my blessing, though I've pushed them all to our > review process anyway so others have the opportunity to do some remark, > catch > typos and all. I'll probably handle remarks if any by myself. > > > >> bad_str_strip.diff > > Warn about suspicious arguments in {bytes,str,unicode}.{l,r,}strip calls. > > > > Closes #74013 > > pushed after a slight modification: merged your checker with former > string_format, > renamed for the occasion into 'string' so the message is now E1310 instead > of W1400, > 14 being occupied by the string_constant checker and casted to an Error as > even if > it won't cause a crash, it's definitly something that should be fixed. > > I've also moved this string_constant from format.py to the renamed as well > strings.py > module. IMO we could also unify checker number and message here, but I > have not > bothered with that yet as it may break configurations. > Sounds good. > >> loop_break.diff > > Emit a warning for loops that have an else clause but no break or > return. > > > > Closes #81378 > > I would vote to kill the special case for return which is IMO highly > arguable. > I feel like the rule should be the same for all, and if one feel like it's > more readable with the else clause anyway, he should add the pragma to > allow > it explicitly . > Ok. It looks like this is already in the repository (though I'm a bit confused wrt hg.logilab.org/review vs hg.logilab.org/master), should I modify the old patch or create a new one to change the warning and the code? > > Also, I would vote for using a Warning rather than a Convention. > I don't mind either way. > > Side note for the future: I've renamed newly introduced test files to use > the > message name rather than the message id, has it's more readable and less > subject > to change. > Good idea. // Torsten
_______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects