Ping?<br>-Nathaniel<br><br><div class="gmail_quote">On Wed, Dec 17, 2008 at 1:57 PM, Nathaniel Manista <span dir="ltr"><<a href="mailto:nathaniel@google.com">nathaniel@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sylvain-<br><br><div class="gmail_quote">On Tue, Dec 16, 2008 at 10:31 AM, Sylvain Thénault <span dir="ltr"><<a href="mailto:sylvain.thenault@logilab.fr" target="_blank">sylvain.thenault@logilab.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[snip introduction]<div class="Ih2E3d"><br>
<div><br>
> I'd like to contribute this code to pylint and am eager to work with<br>
> you toward that end - my choice of terms, warning code (W0108), and of<br>
> which source file is appropriate for it may need to be corrected, for<br>
> example.<br>
<br>
</div>humm, I would use a [R]efactor code since this message is indeed suggesting a<br>
refactoring. Regarding the numbering its fine : the two first number (01<br>
here) are for the ckecher which emit the message, while the two last are used<br>
to have a unique message id while grouping "similar" messages in subsequent<br>
number (though that's not really enforced).<br>
<div></div></div></blockquote><div><br>Actually, I think it fits in far better with the [W]arnings than the [R]efactorings. The warnings are triggered in cases where the programmer did something that they probably didn't intend to do or didn't realize was completely unnecessary - "unnecessary pass statement", "unnecessary semicolon", "statement seems to have no effect", for example. I think that this warning, which could very easily have used the text "lambda seems to have no effect" belongs in that group. In contrast the refactorings (such as "too many public methods") are generally more about code metrics on the scale of modules and classes than about likely errors with individual statements or expressions. Under that reasoning, would the designation "W0108" work for you?<br>
<br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
> I apologize for not submitting it with "hg email" as is suggested<br>
> on the pylint web site - I'm still learning my way around the basics of hg.<br>
> I also apologize for the lack of a unit test - I could neither find on the<br>
> pylint web site instructions for running the existing tests nor figure out<br>
> on my own how to run them (and extend them).<br>
<br>
</div>submitting simple diff is fine as long as the patch is simple and well<br>
targeted, as yours. But not having a test is a problem. Pylint has a simple<br>
functional test system :<br>
* put an input python file into the test/inputs directory<br>
* put a file in the test/messages directory named as your python file but<br>
with '.txt' instead of '.py', containing expected messages<br>
* run the functional tests using "python test_func.py" in the test directory<br>
<br>
take a look at other test to see how they isolate the message to test and what<br>
to put in the message file (take care: message order differs from a bare<br>
pylint execution).<br>
</blockquote></div><div><br>I have done this using func_w0101.py and func_w0101.txt as models; please find the files func_w0108.py and func_w0108.txt attached to this message.<br><br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I would be happy to include your patch once the test are there as well :)<br>
</blockquote></div><div><br>Glad to hear it. Thanks,<br>-Nathaniel<br><br></div></div>
</blockquote></div><br>