Installation

pip install black

Black can be run on any Python file via:

Black pathtofile.py

pyproject.toml

[tool.black]
line-length = 88
target-version = [‘py36, ‘py37, ‘py38, 'py39']
include = ‘\.pyi?$’
exclude = '''
/(
  \.toml
  |\.sh
  |\.git
  |\.ini
  |Dockerfile
  |Jenkinfile
)/
'''