redbaron

Bottom-up approach to refactoring in python

  • 所有者: PyCQA/redbaron
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Introduction

Build Status Latest Version Supported Python versions Development Status Wheel Status Download format License
Backers on Open Collective
Sponsors on Open Collective

RedBaron is a python library and tool powerful enough to be used into IPython
solely that intent to make the process of writing code that modify source
code
as easy and as simple as possible. That include writing custom
refactoring, generic refactoring, tools, IDE or directly modifying you source
code into IPython with a higher and more powerful abstraction than the
advanced texts modification tools that you find in advanced text editors and
IDE.

RedBaron guaranteed you that it will only modify your code where you ask him
to
. To achieve this, it is based on Baron
a lossless AST for
Python that guarantees the operation ast_to_code(code_to_ast(source_code)) == source_code.
(Baron's AST is called an FST, a Full Syntax Tree).

RedBaron API and feel is heavily inspired by BeautifulSoup. It tries to be
simple and intuitive and that once you've get the basics principles, you are
good without reading the doc for 80% of your operations.

For now, RedBaron can be considered in alpha, the core is quite stable but it
is not battle tested yet and is still a bit rough.
Feedback and contribution
are very welcome.

The public documented API on the other side is guaranteed to be
retro-compatible and won't break until 2.0 (if breaking is needed at that
point).
There might be the only exception that if you directly call specific nodes
constructors with FST that this API change, but this is not documented and
simply horribly unpracticable, so I'm expecting no one to do that.

Support

RedBaron is support python python 2 and up to python 3.7 grammar.

Roadmap

Current roadmap is as boring as needed:

  • bug fixes
  • new small features (walker pattern, maybe code generation) and performance improvement.

Installation

pip install redbaron[pygments]

Or if you don't want to have syntax highlight in your shell or don't need it:

pip install redbaron

Running tests

pip install pytest
py.test tests

Community

You can reach us on irc.freenode.net#baron or irc.freenode.net##python-code-quality.

Financial support

Baron and RedBaron are a very advanced piece of engineering that requires a lot
of time of concentration to work on. Until the end of 2018, the development
has been a full volunteer work mostly done by Bram,
but now, to reach the next level and bring those projects to the stability and
quality you expect, we need your support.

You can join our contributors and sponsors on our transparent
OpenCollective, every contribution will
count and will be mainly used to work on the projects stability and quality but
also on continuing, on the side, the R&D side of those projects.

Backers

Thank you to all our backers! ? [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]










Contributors

This project exists thanks to all the people who contribute.

Code of Conduct

As a member of PyCQA, RedBaron follows its Code of Conduct.

Links

RedBaron is fully documented, be sure to check the tutorial and documentation.

主要指標

概覽
名稱與所有者PyCQA/redbaron
主編程語言Python
編程語言Shell (語言數: 2)
平台
許可證
所有者活动
創建於2014-03-23 05:34:39
推送於2022-01-29 21:54:37
最后一次提交2021-12-09 04:12:36
發布數16
最新版本名稱0.9.2 (發布於 )
第一版名稱0.1 (發布於 )
用户参与
星數713
關注者數27
派生數72
提交數1.7k
已啟用問題?
問題數118
打開的問題數70
拉請求數73
打開的拉請求數20
關閉的拉請求數14
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?