black/src/blib2to3
Batuhan Taskaya 1e0ec543ff
black/parser: partial support for pattern matching (#2586)
Partial implementation for #2242. Only works when explicitly stated -t py310.

Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2021-11-13 19:15:31 -08:00
..
pgen2 black/parser: partial support for pattern matching (#2586) 2021-11-13 19:15:31 -08:00
__init__.py Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
Grammar.txt black/parser: partial support for pattern matching (#2586) 2021-11-13 19:15:31 -08:00
LICENSE Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
PatternGrammar.txt Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
pygram.py black/parser: partial support for pattern matching (#2586) 2021-11-13 19:15:31 -08:00
pytree.py Revert "Use lowercase hex numbers fixes #1692 (#1775)" 2021-04-25 19:13:23 +02:00
README blib2to3: support unparenthesized wulruses in more places (#2447) 2021-08-26 13:59:01 -07: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
- Backported the following upstream parser changes:
  - "bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332)"
    https://github.com/python/cpython/commit/cae60187cf7a7b26281d012e1952fafe4e2e97e9
  - "bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317)"
    https://github.com/python/cpython/commit/b0aba1fcdc3da952698d99aec2334faa79a8b68c