redbaron


Nameredbaron JSON
Version 0.9.2 PyPI version JSON
download
home_pagehttps://github.com/PyCQA/redbaron
SummaryAbstraction on top of baron, a FST for python to make writing refactoring code a realistic task
upload_time2019-03-17 18:58:59
maintainer
docs_urlNone
authorLaurent Peuch
requires_python
licenselgplv3+
keywords baron fst ast refactoring
VCS
bugtrack_url
requirements baron pytest pygments
Travis-CI
coveralls test coverage No coveralls.
            Introduction
============

[![Build Status](https://travis-ci.org/PyCQA/redbaron.svg?branch=master)](https://travis-ci.org/PyCQA/redbaron) [![Latest Version](https://img.shields.io/pypi/v/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Development Status](https://img.shields.io/pypi/status/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Wheel Status](https://img.shields.io/pypi/wheel/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Download format](https://img.shields.io/pypi/format/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![License](https://img.shields.io/pypi/l/redbaron.svg)](https://pypi.python.org/pypi/redbaron/)
[![Backers on Open Collective](https://opencollective.com/redbaron/backers/badge.svg)](#backers) 
[![Sponsors on Open Collective](https://opencollective.com/redbaron/sponsors/badge.svg)](#sponsors) 

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](https://github.com/PyCQA/baron)
a lossless [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for
Python that guarantees the operation <code>ast_to_code(code_to_ast(source_code)) == source_code</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](https://webchat.freenode.net/?channels=%23baron) or [irc.freenode.net##python-code-quality](https://webchat.freenode.net/?channels=%23%23python-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](https://github.com/psycojoker),
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](https://opencollective.com/redbaron), 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](https://opencollective.com/redbaron#backer)]

<a href="https://opencollective.com/redbaron#backers" target="_blank"><img src="https://opencollective.com/redbaron/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/redbaron#sponsor)]

<a href="https://opencollective.com/redbaron/sponsor/0/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/1/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/2/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/3/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/4/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/5/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/6/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/7/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/8/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/redbaron/sponsor/9/website" target="_blank"><img src="https://opencollective.com/redbaron/sponsor/9/avatar.svg"></a>

## Contributors

This project exists thanks to all the people who contribute. 
<a href="https://github.com/PyCQA/redbaron/contributors"><img src="https://opencollective.com/redbaron/contributors.svg?width=890&button=false" /></a>

Code of Conduct
===============

As a member of [PyCQA](https://github.com/PyCQA), RedBaron follows its [Code of Conduct](http://meta.pycqa.org/en/latest/code-of-conduct.html).

Links
=====

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

* [Tutorial](https://redbaron.readthedocs.io/en/latest/tuto.html)
* [Documentation](https://redbaron.readthedocs.io/en/latest/)
* [Baron](https://github.com/PyCQA/baron)
* IRC chat: [irc.freenode.net#baron](https://webchat.freenode.net/?channels=%23baron)


Changelog
=========

0.9.2 (2019-03-17)
------------------

- fix a situation in .help() where some code where colorized twice by Hanaasagi https://github.com/PyCQA/redbaron/pull/182

0.9.1 (2019-02-01)
------------------

- fix .names() and variations that didn't handle the case where there was "()" on FromImport nodes

0.9 (2019-02-01)
----------------

- full python 3.7 syntax support

- BREAKING CHANGE: annotations are now member of {Def,List,Dict}Argument to flatten the data structure, TypedNameNode doesn't exist anymore
- add support for return annotation by bram
- add support for variable annotation https://github.com/PyCQA/redbaron/pull/177 by scottbelden and additional work by bram
- add support for raise from by bram

0.8 (2018-10-29)
----------------

- add support to typed function arguments https://github.com/PyCQA/redbaron/pull/168 Scott Belden and additional work by bram
- add support to set async attributes to with/for nodes, was missing in previous release

0.7 (2018-08-21)
----------------

- fix to_python() when strings are indented by stripping whitespace before evaluating by duncf https://github.com/PyCQA/redbaron/pull/140

Python 3 support (based on work in Baron):
- support ellipsis
- support matrix operator
- support f-strings
- support numeric literals
- support nonlocal statement
- support keyword only markers
- support yield from statement
- support async/await statements

0.6.3 (2017-01-02)
-----------------

- fix help() after append
- fix _synchronise() for base_nodes to avoid recursion in __repr__ function if code run not in the shell
- add at method

0.6.2 (2016-10-03)
----------------

- fix some old call to log() weren't lazy, that could cause a crash in some situations by an infinite recursive call and also reduce performances
- fix in _iter_in_rendering_order method to avoid bug in edge cases (issue #107)

0.6.1 (2016-03-28)
----------------

- fix setup.py, package weren't pushed on pypi since splitting of redbaron.py
  into multiple files.

0.6 (2016-03-28)
----------------

This release is guaranteed to have a retro-compatible public documented API
from now on until maybe 2.0.
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.

From now on the focus will be on moving to a stable 1.0 meaning: bugs fixes and
API additions for missing needed features and no more big modifications, this
will be for other releases, the workload is already big enough.

- BIG improvement on the proxy list merging algorithm, it is not perfect yet (comments aren't handled yet) but it's really a big move forward
- possible retrocompatibility breaking change: from now on the node.find("name") to node.name shortcut ONLY works with possible nodes identifiers. For example node.i_dont_exist_as_an_identifier will raise AttributeError
- new helper method .to_python that wrap ast.literal_eval on compatible nodes https://redbaron.readthedocs.io/en/latest/other.html#to-python
- breaking: IntNode no longer return an int on .value but a .string instead, use .to_python to have an evaluated version
- fix node.decrease_indentation (that was simply not working)
- fix code_block_node.value was broken on node with no parent
- add string representation for Path object
- now redbaron Path() class can be compared directly to baron paths
  without using to_baron_path() helper.
- fix by novocaine: 'function' was used as a function type detector instead of 'def'
- add getitem() method with same api on NodeList and ProxyList
- fix: inconsistencies when inserting lines around code blocks
- inserting a blank lines inserts effectively a \n in a LineProxyList
- new helper methods: .next_recursive and .previous_recursive https://redbaron.readthedocs.io/en/latest/other.html
- fix: doc is tested in CI now, it shouldn't break anymore
- more rendering test for python3, it shouldn't break anymore
- pygments is now an optional dependency, "pip install redbaron" won't install it, "pip install redbaron[pygments"] will
- new node.next_intuitive and node.previous_intuitive methods for situations where .next/previous doesn't behave the way the user expect it https://redbaron.readthedocs.io/en/latest/other.html#next-intuitive-previous-intuitive

0.5.1 (2015-03-11)
------------------

- fix whitespace duplication when using .insert()
- DecoratorProxyList of the last method of a function wasn't handling correctly the indentation of its last endl token

0.5 (2015-01-31)
----------------

- fix index handling in get_absolute_bounding_box_of_attribute method in
  a LineProxyList
- pretty rendering of RedBaron repr in ipython notebook using _repr_html_, see:
  https://cloud.githubusercontent.com/assets/41827/5731132/65ff4c92-9b80-11e4-977c-0faebbf63415.png
- fix: RedBaron repr was crashing in bpython and in ipython notebook. The new
  behavior should be way more stable and never crash.
- new helpers .names, .modules, .full_path_modules for from_import node https://redbaron.readthedocs.io/en/latest/other.html#index-on-parent-raw
- add a node.index_on_parent_raw and make node.index_on_parent works has it
  should be intuitively according to the proxy list api https://redbaron.readthedocs.io/en/latest/other.html#index-on-parent-raw
- new helper methods: .insert_before and .insert_after https://redbaron.readthedocs.io/en/latest/other.html#insert-before-insert-after
- fix: some white space bugs in the merging algorithm of line proxy
- fix: on_attribute and parent were correctly set on newly added elements to
  the root node

0.4 (2014-12-11)
----------------

- compatibility with baron upstream (removal of def_argument_node and
  uniformisation of def_arguments structure)
- fix: long wasn't supported in redbaron (due to a bug in baron)

0.3 (2014-11-12)
----------------

- proxy lists, major improvement in the management of list of things
- .append_value is no more since it is useless now due to proxy lists
- .index has been renamed to .index_on_parent to be more coherent

0.2 (2014-09-23)
----------------

- for EVERY NODES in RedBaron, the automagic behavior when passing a string to
  modify an attribute has been done, this is HUGE improvement
  https://redbaron.readthedocs.io/en/latest/modifying.html#full-documentations
- it's now possible to use regex, globs, list/tuple and lambda (callable) in .find and
  .find_all, see https://redbaron.readthedocs.io/en/latest/querying.html#advanced-querying
- new method on node: .replace() to replace in place a node
  https://redbaron.readthedocs.io/en/latest/other.html#replace
- .map .filter and .apply are now documented https://redbaron.readthedocs.io/en/latest/other.html#map-filter-apply
- .edit() new helper method to launch a text editor on the selected node and
  replace the node with the modified code https://redbaron.readthedocs.io/en/latest/other.html#edit
- .root node attribute (property) that return the root node of the tree in which the
  node is stored https://redbaron.readthedocs.io/en/latest/other.html#root
- .index node attribute (property) that returns the index at which the node is
  store if it's store in a nodelist, None otherwise https://redbaron.readthedocs.io/en/latest/other.html#index
- setitem (a[x] = b) on nodelist now works as expected (accepting string, fst
  node and redbaron node)
- new method to handle indentation: .increase_indentation and .decrease_indentation https://redbaron.readthedocs.io/en/latest/other.html#increase-indentation-and-decrease-indentation
- various small bugfix
- we have one new contributor \o/ https://github.com/ze42
- to_node has been move to a class method of Node: Node.from_fst
- pretty print of nodes when using redbaron in a script

0.1 (2014-06-13)
----------------

- First release

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PyCQA/redbaron",
    "name": "redbaron",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "baron fst ast refactoring",
    "author": "Laurent Peuch",
    "author_email": "cortex@worlddomination.be",
    "download_url": "https://files.pythonhosted.org/packages/92/14/d04d376cca5108e62edeee2d2fc0261af6474d9aebe0b4334721785bc035/redbaron-0.9.2.tar.gz",
    "platform": "",
    "description": "Introduction\n============\n\n[![Build Status](https://travis-ci.org/PyCQA/redbaron.svg?branch=master)](https://travis-ci.org/PyCQA/redbaron) [![Latest Version](https://img.shields.io/pypi/v/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Development Status](https://img.shields.io/pypi/status/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Wheel Status](https://img.shields.io/pypi/wheel/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Download format](https://img.shields.io/pypi/format/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![License](https://img.shields.io/pypi/l/redbaron.svg)](https://pypi.python.org/pypi/redbaron/)\n[![Backers on Open Collective](https://opencollective.com/redbaron/backers/badge.svg)](#backers) \n[![Sponsors on Open Collective](https://opencollective.com/redbaron/sponsors/badge.svg)](#sponsors) \n\nRedBaron is a python library and tool powerful enough to be used into IPython\nsolely that intent to make the process of **writing code that modify source\ncode** as easy and as simple as possible. That include writing custom\nrefactoring, generic refactoring, tools, IDE or directly modifying you source\ncode into IPython with a higher and more powerful abstraction than the\nadvanced texts modification tools that you find in advanced text editors and\nIDE.\n\nRedBaron guaranteed you that **it will only modify your code where you ask him\nto**. To achieve this, it is based on [Baron](https://github.com/PyCQA/baron)\na lossless [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for\nPython that guarantees the operation <code>ast_to_code(code_to_ast(source_code)) == source_code</code>.\n(Baron's AST is called an FST, a Full Syntax Tree).\n\nRedBaron API and feel is heavily inspired by BeautifulSoup. It tries to be\nsimple and intuitive and that once you've get the basics principles, you are\ngood without reading the doc for 80% of your operations.\n\n**For now, RedBaron can be considered in alpha, the core is quite stable but it\nis not battle tested yet and is still a bit rough.** Feedback and contribution\nare very welcome.\n\nThe public documented API on the other side is guaranteed to be\nretro-compatible and won't break until 2.0 (if breaking is needed at that\npoint).\nThere might be the only exception that if you directly call specific nodes\nconstructors with FST that this API change, but this is not documented and\nsimply horribly unpracticable, so I'm expecting no one to do that.\n\nSupport\n=======\n\nRedBaron is support python python 2 and up to python 3.7 grammar.\n\nRoadmap\n=======\n\nCurrent roadmap is as boring as needed:\n\n* bug fixes\n* new small features (walker pattern, maybe code generation) and performance improvement.\n\nInstallation\n============\n\n    pip install redbaron[pygments]\n\nOr if you don't want to have syntax highlight in your shell or don't need it:\n\n    pip install redbaron\n\nRunning tests\n=============\n\n    pip install pytest\n    py.test tests\n\nCommunity\n=========\n\nYou can reach us on [irc.freenode.net#baron](https://webchat.freenode.net/?channels=%23baron) or [irc.freenode.net##python-code-quality](https://webchat.freenode.net/?channels=%23%23python-code-quality).\n\nFinancial support\n=================\n\nBaron and RedBaron are a very advanced piece of engineering that requires a lot\nof time of concentration to work on. Until the end of 2018, the development\nhas been a full volunteer work mostly done by [Bram](https://github.com/psycojoker),\nbut now, to reach the next level and bring those projects to the stability and\nquality you expect, we need your support.\n\nYou can join our contributors and sponsors on our transparent\n[OpenCollective](https://opencollective.com/redbaron), every contribution will\ncount and will be mainly used to work on the projects stability and quality but\nalso on continuing, on the side, the R&D side of those projects.\n\n\n## Backers\n\nThank you to all our backers! \ud83d\ude4f [[Become a backer](https://opencollective.com/redbaron#backer)]\n\n<a href=\"https://opencollective.com/redbaron#backers\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/backers.svg?width=890\"></a>\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/redbaron#sponsor)]\n\n<a href=\"https://opencollective.com/redbaron/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/redbaron/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/redbaron/sponsor/9/avatar.svg\"></a>\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. \n<a href=\"https://github.com/PyCQA/redbaron/contributors\"><img src=\"https://opencollective.com/redbaron/contributors.svg?width=890&button=false\" /></a>\n\nCode of Conduct\n===============\n\nAs a member of [PyCQA](https://github.com/PyCQA), RedBaron follows its [Code of Conduct](http://meta.pycqa.org/en/latest/code-of-conduct.html).\n\nLinks\n=====\n\n**RedBaron is fully documented, be sure to check the tutorial and documentation**.\n\n* [Tutorial](https://redbaron.readthedocs.io/en/latest/tuto.html)\n* [Documentation](https://redbaron.readthedocs.io/en/latest/)\n* [Baron](https://github.com/PyCQA/baron)\n* IRC chat: [irc.freenode.net#baron](https://webchat.freenode.net/?channels=%23baron)\n\n\nChangelog\n=========\n\n0.9.2 (2019-03-17)\n------------------\n\n- fix a situation in .help() where some code where colorized twice by Hanaasagi https://github.com/PyCQA/redbaron/pull/182\n\n0.9.1 (2019-02-01)\n------------------\n\n- fix .names() and variations that didn't handle the case where there was \"()\" on FromImport nodes\n\n0.9 (2019-02-01)\n----------------\n\n- full python 3.7 syntax support\n\n- BREAKING CHANGE: annotations are now member of {Def,List,Dict}Argument to flatten the data structure, TypedNameNode doesn't exist anymore\n- add support for return annotation by bram\n- add support for variable annotation https://github.com/PyCQA/redbaron/pull/177 by scottbelden and additional work by bram\n- add support for raise from by bram\n\n0.8 (2018-10-29)\n----------------\n\n- add support to typed function arguments https://github.com/PyCQA/redbaron/pull/168 Scott Belden and additional work by bram\n- add support to set async attributes to with/for nodes, was missing in previous release\n\n0.7 (2018-08-21)\n----------------\n\n- fix to_python() when strings are indented by stripping whitespace before evaluating by duncf https://github.com/PyCQA/redbaron/pull/140\n\nPython 3 support (based on work in Baron):\n- support ellipsis\n- support matrix operator\n- support f-strings\n- support numeric literals\n- support nonlocal statement\n- support keyword only markers\n- support yield from statement\n- support async/await statements\n\n0.6.3 (2017-01-02)\n-----------------\n\n- fix help() after append\n- fix _synchronise() for base_nodes to avoid recursion in __repr__ function if code run not in the shell\n- add at method\n\n0.6.2 (2016-10-03)\n----------------\n\n- fix some old call to log() weren't lazy, that could cause a crash in some situations by an infinite recursive call and also reduce performances\n- fix in _iter_in_rendering_order method to avoid bug in edge cases (issue #107)\n\n0.6.1 (2016-03-28)\n----------------\n\n- fix setup.py, package weren't pushed on pypi since splitting of redbaron.py\n  into multiple files.\n\n0.6 (2016-03-28)\n----------------\n\nThis release is guaranteed to have a retro-compatible public documented API\nfrom now on until maybe 2.0.\nThere might be the only exception that if you directly call specific nodes\nconstructors with FST that this API change, but this is not documented and\nsimply horribly unpracticable, so I'm expecting no one to do that.\n\nFrom now on the focus will be on moving to a stable 1.0 meaning: bugs fixes and\nAPI additions for missing needed features and no more big modifications, this\nwill be for other releases, the workload is already big enough.\n\n- BIG improvement on the proxy list merging algorithm, it is not perfect yet (comments aren't handled yet) but it's really a big move forward\n- possible retrocompatibility breaking change: from now on the node.find(\"name\") to node.name shortcut ONLY works with possible nodes identifiers. For example node.i_dont_exist_as_an_identifier will raise AttributeError\n- new helper method .to_python that wrap ast.literal_eval on compatible nodes https://redbaron.readthedocs.io/en/latest/other.html#to-python\n- breaking: IntNode no longer return an int on .value but a .string instead, use .to_python to have an evaluated version\n- fix node.decrease_indentation (that was simply not working)\n- fix code_block_node.value was broken on node with no parent\n- add string representation for Path object\n- now redbaron Path() class can be compared directly to baron paths\n  without using to_baron_path() helper.\n- fix by novocaine: 'function' was used as a function type detector instead of 'def'\n- add getitem() method with same api on NodeList and ProxyList\n- fix: inconsistencies when inserting lines around code blocks\n- inserting a blank lines inserts effectively a \\n in a LineProxyList\n- new helper methods: .next_recursive and .previous_recursive https://redbaron.readthedocs.io/en/latest/other.html\n- fix: doc is tested in CI now, it shouldn't break anymore\n- more rendering test for python3, it shouldn't break anymore\n- pygments is now an optional dependency, \"pip install redbaron\" won't install it, \"pip install redbaron[pygments\"] will\n- new node.next_intuitive and node.previous_intuitive methods for situations where .next/previous doesn't behave the way the user expect it https://redbaron.readthedocs.io/en/latest/other.html#next-intuitive-previous-intuitive\n\n0.5.1 (2015-03-11)\n------------------\n\n- fix whitespace duplication when using .insert()\n- DecoratorProxyList of the last method of a function wasn't handling correctly the indentation of its last endl token\n\n0.5 (2015-01-31)\n----------------\n\n- fix index handling in get_absolute_bounding_box_of_attribute method in\n  a LineProxyList\n- pretty rendering of RedBaron repr in ipython notebook using _repr_html_, see:\n  https://cloud.githubusercontent.com/assets/41827/5731132/65ff4c92-9b80-11e4-977c-0faebbf63415.png\n- fix: RedBaron repr was crashing in bpython and in ipython notebook. The new\n  behavior should be way more stable and never crash.\n- new helpers .names, .modules, .full_path_modules for from_import node https://redbaron.readthedocs.io/en/latest/other.html#index-on-parent-raw\n- add a node.index_on_parent_raw and make node.index_on_parent works has it\n  should be intuitively according to the proxy list api https://redbaron.readthedocs.io/en/latest/other.html#index-on-parent-raw\n- new helper methods: .insert_before and .insert_after https://redbaron.readthedocs.io/en/latest/other.html#insert-before-insert-after\n- fix: some white space bugs in the merging algorithm of line proxy\n- fix: on_attribute and parent were correctly set on newly added elements to\n  the root node\n\n0.4 (2014-12-11)\n----------------\n\n- compatibility with baron upstream (removal of def_argument_node and\n  uniformisation of def_arguments structure)\n- fix: long wasn't supported in redbaron (due to a bug in baron)\n\n0.3 (2014-11-12)\n----------------\n\n- proxy lists, major improvement in the management of list of things\n- .append_value is no more since it is useless now due to proxy lists\n- .index has been renamed to .index_on_parent to be more coherent\n\n0.2 (2014-09-23)\n----------------\n\n- for EVERY NODES in RedBaron, the automagic behavior when passing a string to\n  modify an attribute has been done, this is HUGE improvement\n  https://redbaron.readthedocs.io/en/latest/modifying.html#full-documentations\n- it's now possible to use regex, globs, list/tuple and lambda (callable) in .find and\n  .find_all, see https://redbaron.readthedocs.io/en/latest/querying.html#advanced-querying\n- new method on node: .replace() to replace in place a node\n  https://redbaron.readthedocs.io/en/latest/other.html#replace\n- .map .filter and .apply are now documented https://redbaron.readthedocs.io/en/latest/other.html#map-filter-apply\n- .edit() new helper method to launch a text editor on the selected node and\n  replace the node with the modified code https://redbaron.readthedocs.io/en/latest/other.html#edit\n- .root node attribute (property) that return the root node of the tree in which the\n  node is stored https://redbaron.readthedocs.io/en/latest/other.html#root\n- .index node attribute (property) that returns the index at which the node is\n  store if it's store in a nodelist, None otherwise https://redbaron.readthedocs.io/en/latest/other.html#index\n- setitem (a[x] = b) on nodelist now works as expected (accepting string, fst\n  node and redbaron node)\n- new method to handle indentation: .increase_indentation and .decrease_indentation https://redbaron.readthedocs.io/en/latest/other.html#increase-indentation-and-decrease-indentation\n- various small bugfix\n- we have one new contributor \\o/ https://github.com/ze42\n- to_node has been move to a class method of Node: Node.from_fst\n- pretty print of nodes when using redbaron in a script\n\n0.1 (2014-06-13)\n----------------\n\n- First release\n",
    "bugtrack_url": null,
    "license": "lgplv3+",
    "summary": "Abstraction on top of baron, a FST for python to make writing refactoring code a realistic task",
    "version": "0.9.2",
    "split_keywords": [
        "baron",
        "fst",
        "ast",
        "refactoring"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d806c1c97efe5d30593337721923c5813b3b4eaffcffb706e523acf3d3bc9e8c",
                "md5": "9f5e0b1766e15e393dbe06601c72fee9",
                "sha256": "d01032b6a848b5521a8d6ef72486315c2880f420956870cdd742e2b5a09b9bab"
            },
            "downloads": -1,
            "filename": "redbaron-0.9.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f5e0b1766e15e393dbe06601c72fee9",
            "packagetype": "bdist_wheel",
            "python_version": "2.7",
            "requires_python": null,
            "size": 34893,
            "upload_time": "2019-03-17T18:59:01",
            "upload_time_iso_8601": "2019-03-17T18:59:01.529362Z",
            "url": "https://files.pythonhosted.org/packages/d8/06/c1c97efe5d30593337721923c5813b3b4eaffcffb706e523acf3d3bc9e8c/redbaron-0.9.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9214d04d376cca5108e62edeee2d2fc0261af6474d9aebe0b4334721785bc035",
                "md5": "bd79cd9445db6565046da2165c7be7e3",
                "sha256": "472d0739ca6b2240bb2278ae428604a75472c9c12e86c6321e8c016139c0132f"
            },
            "downloads": -1,
            "filename": "redbaron-0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bd79cd9445db6565046da2165c7be7e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 709401,
            "upload_time": "2019-03-17T18:58:59",
            "upload_time_iso_8601": "2019-03-17T18:58:59.232551Z",
            "url": "https://files.pythonhosted.org/packages/92/14/d04d376cca5108e62edeee2d2fc0261af6474d9aebe0b4334721785bc035/redbaron-0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-03-17 18:58:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "PyCQA",
    "github_project": "redbaron",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "baron",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "<",
                    "4"
                ]
            ]
        },
        {
            "name": "pygments",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "redbaron"
}
        
Elapsed time: 0.52529s