Ping?<br>-Nathaniel<br><br><div class="gmail_quote">On Wed, Dec 17, 2008 at 1:57 PM, Nathaniel Manista <span dir="ltr">&lt;<a href="mailto:nathaniel@google.com">nathaniel@google.com</a>&gt;</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">&lt;<a href="mailto:sylvain.thenault@logilab.fr" target="_blank">sylvain.thenault@logilab.fr</a>&gt;</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>
&gt; &nbsp; &nbsp; I&#39;d like to contribute this code to pylint and am eager to work with<br>
&gt; you toward that end - my choice of terms, warning code (W0108), and of<br>
&gt; which source file is appropriate for it may need to be corrected, for<br>
&gt; 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 &quot;similar&quot; messages in subsequent<br>
number (though that&#39;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&#39;t intend to do or didn&#39;t realize was completely unnecessary - &quot;unnecessary pass statement&quot;, &quot;unnecessary semicolon&quot;, &quot;statement seems to have no effect&quot;, for example. I think that this warning, which could very easily have used the text &quot;lambda seems to have no effect&quot; belongs in that group. In contrast the refactorings (such as &quot;too many public methods&quot;) 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 &quot;W0108&quot; 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>
&gt; I apologize for not submitting it with &quot;hg email&quot; as is suggested<br>
&gt; on the pylint web site - I&#39;m still learning my way around the basics of hg.<br>
&gt; I also apologize for the lack of a unit test - I could neither find on the<br>
&gt; pylint web site instructions for running the existing tests nor figure out<br>
&gt; 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 &#39;.txt&#39; instead of &#39;.py&#39;, containing expected messages<br>
* run the functional &nbsp;tests using &quot;python test_func.py&quot; 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>