prosodia
Bowler
Our great sponsors
prosodia | Bowler | |
---|---|---|
1 | 4 | |
1 | 1,513 | |
- | 0.5% | |
0.0 | 0.0 | |
over 4 years ago | about 1 month ago | |
Python | Python | |
MIT License | MIT License |
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.
prosodia
-
Show HN: Python Source Code Refactoring Toolkit via AST
I wrote a library that takes a language specification (BNF, ABNF, etc) into a custom AST in Python. Then you can define a set of visitors for the custom AST to transform the tree into whatever you want. I implemented some checks integrated into the Python type system to type-check the visitors and I've used the library to do some non-trivial manipulations before.
It's mostly a pet project and I just wanted to share since it could maybe at least inspire something.
https://github.com/chrisphilip322/prosodia
Bowler
- Bowler · Safe code refactoring for modern Python
- Bowler – Safe code refactoring for modern Python
-
Show HN: Python Source Code Refactoring Toolkit via AST
A similar type project. Though I haven't seen much activity recently:
https://github.com/facebookincubator/Bowler
-
Our Engineering Team Used Python's AST to Patch 100,000s of Lines of Code
I have done something similar using https://pybowler.io/. This library wraps the LibCST library and abstracts away some of the refactoring operations into nice wrapper functions.
What are some alternatives?
semgrep - Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.
Rope - a python refactoring library
prefactor - Tool for writing Python refactorings
RedBaron - Bottom-up approach to refactoring in python
hpy - HPy: a better API for Python
LibCST - A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree
py2js
refactor - AST-based fragmental source code refactoring toolkit for Python
pasta - Library to refactor python code through AST manipulation.