Python Formats

Jan 16, 2016, updated Aug 11, 2019 DevOps

This is a good resource to use “”.format() and to describe the usage: TIL: New String Formatting in Python

This is a Good resource for python style elements-of-python-style

Python Formatters


pip install yapf

Configurations vi ~/.config/yapf/style

$ yapf -i -r .
$ yapf -i --exclude *migrations*.py -r .


pip install isort

$ isort -y
$ find . -name "*.py" ! -path "*migrations/*" -exec isort {} \;

isort does not support skipping a pattern