Is there a tool to automatically convert string formatting types to f-strings? [closed]

You can use flynt to convert multiple python files to use f-strings.

To run it, you need a python 3.6+ interpreter. Then, its as simple as:

pip install flynt
flynt [relative or absolute path to the root of your project]

Keep in mind that it will change files in place, so it is advisable to commit those to git or SVC system of your preference.

Here is an article describing the pros and cons of f-strings:

https://medium.com/@ikamen/f-strings-make-your-python-code-faster-and-more-readable-today-579ef9ca0313

Disclaimer: I am the author of flynt package.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)