black/blib2to3
Michael J. Sullivan 3e60f6d454 Support compilation with mypyc (#1009)
* Make most of blib2to3 directly typed and mypyc-compatible

This used a combination of retype and pytype's merge-pyi to do the
initial merges of the stubs, which then required manual tweaking to
make actually typecheck and work with mypyc.

Co-authored-by: Sanjit Kalapatapu <sanjitkal@gmail.com>
Co-authored-by: Michael J. Sullivan <sully@msully.net>

* Make black able to compile and run with mypyc

The changes made fall into a couple categories:
 * Fixing actual type mistakes that slip through the cracks
 * Working around a couple mypy bugs (the most annoying of which being
   that we need to add type annotations in a number of places where
   variables are initialized to None)

Co-authored-by: Sanjit Kalapatapu <sanjitkal@gmail.com>
Co-authored-by: Michael J. Sullivan <sully@msully.net>
2019-10-30 07:29:29 -07:00
..
pgen2 Support compilation with mypyc (#1009) 2019-10-30 07:29:29 -07:00
__init__.py Blacken .py files in blib2to3 (#1011) 2019-10-20 15:55:31 +02:00
Grammar.txt Support PEP 572 in while statements (#1028) 2019-09-18 12:54:40 +01:00
LICENSE Link to GitHub + HTTPS + typos (#303) 2018-06-06 09:50:08 -07:00
PatternGrammar.txt Initial commit 2018-03-14 12:55:32 -07:00
pygram.py Support compilation with mypyc (#1009) 2019-10-30 07:29:29 -07:00
pytree.py Support compilation with mypyc (#1009) 2019-10-30 07:29:29 -07:00
README Changes default logger used by blib2to3 Driver (#732) 2019-03-14 13:39:42 +01:00

A subset of lib2to3 taken from Python 3.7.0b2.
Commit hash: 9c17e3a1987004b8bcfbe423953aad84493a7984

Reasons for forking:
- consistent handling of f-strings for users of Python < 3.6.2
- backport of BPO-33064 that fixes parsing files with trailing commas after
  *args and **kwargs
- backport of GH-6143 that restores the ability to reformat legacy usage of
  `async`
- support all types of string literals
- better ability to debug (better reprs)
- INDENT and DEDENT don't hold whitespace and comment prefixes
- ability to Cythonize

Change Log:
- Changes default logger used by Driver