tbpatch VS LibCST

Compare tbpatch vs LibCST and see what are their differences.

tbpatch

Token-based patch experiments (by ayourtch)

LibCST

A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree (by Instagram)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
tbpatch LibCST
1 9
0 1,430
- 2.5%
0.0 8.5
about 3 years ago 1 day ago
Rust Python
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tbpatch

Posts with mentions or reviews of tbpatch. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-06-07.
  • Our Engineering Team Used Python's AST to Patch 100,000s of Lines of Code
    9 projects | news.ycombinator.com | 7 Jun 2021
    I had a problem of applying patches to the files that got indented differently meantime.

    So I wrote a tool that takes a context diff, rebuilds the before and after text, then parses both as vectors of (leading whitespaces, token), then creates a diff of those vectors ignoring the whitespaces, parses the target file as a similar vector, and applies this diff to such a vector (again with ignoring/copying whitespaces) - after which it reconstructs the text.

    The results are surprisingly robust, despite the relatively naive tokenization heuristic.

    https://github.com/ayourtch/tbpatch

LibCST

Posts with mentions or reviews of LibCST. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-23.

What are some alternatives?

When comparing tbpatch and LibCST you can also consider the following projects:

pasta - Library to refactor python code through AST manipulation.

RedBaron - Bottom-up approach to refactoring in python

Bowler - Safe code refactoring for modern Python.

lib3to6 - Build universally compatible python packages from a substantial subset of Python 3.8.

black - The uncompromising Python code formatter

ufmt - Safe, atomic formatting with black and µsort

instaviz - Instant visualization of Python AST and Code Objects

ruff - An extremely fast Python linter and code formatter, written in Rust.