ast-grep-py-0.42.1


توضیحات

Structural Search and Rewrite code at large scale using precise AST pattern.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل ast-grep-py-0.42.1
نام ast-grep-py
نسخه کتابخانه 0.42.1
نگهدارنده []
ایمیل نگهدارنده ['Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>']
نویسنده -
ایمیل نویسنده Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/ast-grep-py/
مجوز MIT
# ast-grep python binding [![PyPI](https://img.shields.io/pypi/v/ast-grep-py.svg?logo=PyPI)](https://pypi.org/project/ast-grep-py/) [![Website](https://img.shields.io/badge/ast--grep-Ast--Grep_Website-red?logoColor=red)](https://ast-grep.github.io/) <p align=center> <img src="https://ast-grep.github.io/logo.svg" alt="ast-grep"/> </p> ## ast-grep `ast-grep` is a tool for code structural search, lint, and rewriting. This crate intends to build a native python binding of ast-grep and provide a python API for programmatic usage. ## Installation ```bash pip install ast-grep-py ``` ## Usage You can take our tests as examples. For example, [test_simple.py](./tests/test_simple.py) shows how to use ast-grep to search for a pattern in a file. Please see the [API usage guide](https://ast-grep.github.io/guide/api-usage.html) and [API reference](https://ast-grep.github.io/reference/api.html) for more details. Other resources include [ast-grep's official site](https://ast-grep.github.io/) and [repository](https://github.com/ast-grep/ast-grep). ## Development ### Setup virtualenv ```shell python -m venv venv ``` ### Activate venv ```shell source venv/bin/activate ``` ### Install `maturin` ```shell pip install maturin[patchelf] ``` ### MacOS: Install `patchelf` and `maturin` ```shell brew install patchelf pip install maturin ``` ### Build bindings ```shell maturin develop ``` ### Run tests ```shell pytest ``` All tests files are under [tests](./tests) directory. ## License This project is licensed under the MIT license.


نیازمندی

مقدار نام
xtr pytest>=7;


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl ast-grep-py-0.42.1:

    pip install ast-grep-py-0.42.1.whl


نصب پکیج tar.gz ast-grep-py-0.42.1:

    pip install ast-grep-py-0.42.1.tar.gz