The repository contains examples of using the fun-with-ast library.
We assume you use python > 3.6
mkdir ~/example_fun_with_ast
cd ~/example_fun_with_ast
python3 -m venv environment
source environment/bin/activate
git clone https://github.com/shairubin/test-fun-with-ast
pip uninstall fun-with-ast
pip install --index-url https://test.pypi.org/simple/ fun-with-ast
cd test-fun-with-ast/source_manipulation_examples/
PYTHONPATH=../ python rewrite_if_examples.py
PYTHONPATH=../ python swap_if_else_examples.py
cd ../preserve_source_examples
PYTHONPATH=../ python source_code_preserve_tests.py
deactivate
rm -rf ~/example_fun_with_ast