fstring_to_format
fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.
There are other packages for this too, but this is a regular expression based cleaner solution.
Installation
Use the package manager pip to install fstring_to_format.
$ pip install fstring_to_format
# to make sure you have the latest version
$ pip install -U fstring_to_format
# latest available code base
$ pip install -U git+https://github.com/eftalgezer/fstring_to_format.git
Usage
$ python -m fstring_to_format filename.py # for a single file
$ python -m fstring_to_format *.py # for all Python files in a directory
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.