redbaron icon indicating copy to clipboard operation
redbaron copied to clipboard

Bottom-up approach to refactoring in python

Results 93 redbaron issues
Sort by recently updated
recently updated
newest added

``` $ git clone ... $ py.test tests ================================================================================ test session starts ================================================================================= platform linux -- Python 3.9.5, pytest-7.1.2, pluggy-0.13.0 rootdir: /mnt/C/project/contrib/redbaron collected 1431 items / 1 error ======================================================================================= ERRORS...

Hi ! The following code: import redbaron import json print(json.dumps(redbaron.RedBaron('from ...util import properties').fst(), indent=4)) returns: [ { "type": "from_import", "first_formatting": [ { "type": "space", "value": " " } ], "value":...

Hi ! While running RedBaron on all .py of my virtualenv, i got the following error: Traceback (most recent call last): File "proj/proj.py", line 149, in main() File "proj/proj.py", line...

Problem: Regular expressions use the backslash character ('\') to indicate special forms or to allow special characters to be used without invoking their special meaning. This collides with Python’s usage...

Version: 0.9.2 Test case: ```python import ast, json from redbaron import RedBaron test_case = """ def foo( bar, baz, ): # test # break pass """.lstrip() print(ast.dump(ast.parse(test_case), indent=4)) # dump...

What I'm imagining is using `ast` to find and modify nodes, and when ready to emit (unparse) align with the FST so that only what the AST has changed will...

The following code illustrates an issue in redbaron 0.9.2 where it fails to parse unicode literals ```python import textwrap import redbaron # This works properly text = textwrap.dedent( ''' p1,...

The file, _test3.py_, being parsed: ``` from abc import ABCMeta, abstractmethod class Employee(metaclass=ABCMeta): pass ``` The test case: ``` from redbaron import RedBaron with open("test3.py", "r") as source_code: red =...

AST is blessed and in the standard lib, so it is a standard used by some tools, so it'd be nice to be able to convert a `redbaron` AST into...