El dom, 21 nov 2021 a las 14:35, Peter Ludemann (<peter.ludem...@gmail.com>)
escribió:

> Neil Girdhar wrote:
> > I wish this had gotten more attention! :)
>
> I wonder what the various projects are doing to handle the latest version
> of Python, if they need a parse tree with whitespace information. (The
> projects I know of are yapf, black, mypy, pytype, kythe -- are there
> others?)
>
mypy just uses the ast module; it doesn't care about whitespace.

For Black, we're using a patched version of lib2to3. Batuhan kindly
contributed a patch that extends our version of lib2to3 to mostly parse the
match statement (https://github.com/psf/black/pull/2586).

And I had never heard of kythe, so I am going to look that up now.


>
> ast.parse() has an option `type_comments`, so certain kinds of comments
> are handled -- I wonder how much work it would be to extend this to handle
> all whitespace?
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/747HHPVSNK6TCSOZHJHUEUDX2GKQROKN/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LETCFPQEKCRPRJTXZEMZIDGWKSR7LVDK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to