This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jimmylai
Recipients benjamin.peterson, ethan smith, gregory.p.smith, gvanrossum, jimmylai, jwilk, kernc, levkivskyi, lukasz.langa, n_rosenstein, njs, serhiy.storchaka, zsol
Date 2020-03-13.13:58:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Just found Guido mentioned LibCST. Here is a quick overview:
1. LibCST is an open source Python concrete syntax tree parser. It provides a CST looks like and feel like AST.

2. It's built by Instagram for linter and refactoring tools (exact use cases what Łukasz mentioned). We have a linter framework built on top of LibCST which allows a lint rule automatically fixes the issue (autofixer) for developers. We're working on open source it to help developers write better code easily. CC Tim
We also found a couple other linter related open source tools use LibCST.

3. It's based on parso (which based on pgen2) and currently supports Python 3.5 to 3.8. Tim is working on adding the support back to 3.0 now and potentially 2.7 later.

4. It provides various patterns for traversing and modifying CST easily, including the AST visitor/transformer pattern, matchers pattern, various helpers for find/replace nodes in a tree and high level transform helpers (e.g. added needed import, remove unused import).

5. It also provides metadata for tree node from static analysis, e.g. line/column position, qualified name, scope analysis, inferred type annotation (through Pyre). Those are useful information for building advanced linter or refactoring tool.

There are more features available in LibCST. We continue to develop it to make automated refactoring even easier. We welcome your feedback and PRs!
Date User Action Args
2020-03-13 13:58:38jimmylaisetrecipients: + jimmylai, gvanrossum, gregory.p.smith, benjamin.peterson, jwilk, njs, lukasz.langa, serhiy.storchaka, kernc, levkivskyi, ethan smith, zsol, n_rosenstein
2020-03-13 13:58:38jimmylaisetmessageid: <>
2020-03-13 13:58:38jimmylailinkissue33337 messages
2020-03-13 13:58:38jimmylaicreate