<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 17, 2018 at 1:17 PM, Jelle Zijlstra <span dir="ltr"><<a href="mailto:jelle.zijlstra@gmail.com" target="_blank">jelle.zijlstra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">2018-07-17 12:37 GMT-07:00 Philippe Fremy <span dir="ltr"><<a href="mailto:phil.fremy@free.fr" target="_blank">phil.fremy@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
While contributing to pyannotate, I became familiar enough with 2to3<br>
fixers to be able to convert Python 2 style annotations to Python 3.<br>
<br>
Is it something that would be interesting to put into python 2to3 ? If<br>
so I would propose a PR for this.<br>
<br></blockquote></span><div>There already a tool that does this: <a href="https://github.com/ilevkivskyi/com2ann" target="_blank">https://github.com/<wbr>ilevkivskyi/com2ann</a>.</div></div></div></div></blockquote><div><br></div><div>IIRC that tool so far only converts variable declarations with `# type:` comments to PEP 526 style. Doing function signatures too seems on the TODO list:</div><div><a href="https://github.com/ilevkivskyi/com2ann/issues/3">https://github.com/ilevkivskyi/com2ann/issues/3</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I am not sure it would be appropriate for 2to3. Type comments still work in Python 3, and I feel like 2to3 should do the minimum necessary to get working code in Python 3.</div></div></div></div></blockquote></div><br></div><div class="gmail_extra">I think as an optional fixer it would be a fine contribution.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also I apologize for not yet reviewing <a href="https://github.com/dropbox/pyannotate/pull/74">https://github.com/dropbox/pyannotate/pull/74</a> (which I presume is yours?).<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>