black/src/blib2to3
2024-06-01 13:01:36 -07:00
..
pgen2 tokenizer: skip lines that are just slash and whitespace (#4343) 2024-06-01 13:01:36 -07:00
__init__.py Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
Grammar.txt Support PEP 696 (#4327) 2024-04-23 22:08:37 -07: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 Add PEP 701 support (#3822) 2024-04-22 08:19:19 -07:00
pytree.py Ensure blib2to3.pygram is initialized before use (#4224) 2024-03-02 19:31:02 -08:00
README Fix most blib2to3 lint (#3794) 2023-07-16 21:33:58 -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
- Tweaks to help mypyc compile faster code (including inlining type information,
  "Final-ing", etc.)