black/blib2to3
Michael J. Sullivan 0ff718e1e2 Blacken .py files in blib2to3 (#1011)
* Blacken .py files in blib2to3

This is in preparation for adding type annotations to blib2to3 in
order to compiling it with mypyc (#1009, which I can rebase on top of
this).

To enforce that it stays blackened, I just cargo-culted the existing
test code used for validating formatting. It feels pretty clunky now,
though, so I can abstract the common logic out into a helper if that
seems better. (But error messages might be less clear then?)

* Tidy up the tests
2019-10-20 15:55:31 +02:00
..
pgen2 Blacken .py files in blib2to3 (#1011) 2019-10-20 15:55:31 +02:00
__init__.py Blacken .py files in blib2to3 (#1011) 2019-10-20 15:55:31 +02:00
__init__.pyi Initial commit 2018-03-14 12:55:32 -07: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 Blacken .py files in blib2to3 (#1011) 2019-10-20 15:55:31 +02:00
pygram.pyi Add support for walrus operator (#935) 2019-07-28 16:03:23 +01:00
pytree.py Blacken .py files in blib2to3 (#1011) 2019-10-20 15:55:31 +02:00
pytree.pyi Clean up typing ignores, fix build 2018-03-15 23:26:56 -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