[PATCH py3 resend] py3: initial type hinting stubs

Martijn Pieters mj at zopatista.com
Thu May 18 14:52:39 EDT 2017


On 18 May 2017, at 19:22, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> On Wed, Mar 15, 2017 at 11:09 AM, Martijn Pieters <mj at zopatista.com <mailto:mj at zopatista.com>> wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters at fb.com <mailto:mjpieters at fb.com>>
> # Date 1489356745 25200
> #      Sun Mar 12 15:12:25 2017 -0700
> # Node ID c363e933a66bb85ddbfe8301bbfd246ecaad95d6
> # Parent  719e64bf9ec2d7b8e86b6550a5d193b3c67944d1
> py3: initial type hinting stubs
> 
> These are stub files to be used by mypy and future tooling to check type hints
> in Python 3. These files are complete for the current state of the covered
> modules. Future tooling should ensure that these are kept in sync.
> 
> Out of curiosity, does our recent decision to drop Python 2.6 make type hinting easier in any way?

Python 2.x is not being type hinted.

You could say that simplifying the backwards-compatibility shims to remove Py 2.6 compatibility may make a small difference, but the syntax changes are not all that big between 2.6 and 2.7 (set literals, dict and set comprehensions, multiple context managers per `with` statement, that's it really).

So no, I don't think it makes a difference.

Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170518/0e678c0a/attachment.html>


More information about the Mercurial-devel mailing list