個人的なメモ用
目次
フォーマッター
https://qiita.com/sin9270/items/85e2dab4c0144c79987d
poetryでの設定
モジュールの追加
$ poetry add isort black flake8 --group dev
pyproject.tomlに設定を追加
[tool.black]
line-length = 119
[tool.isort]
profile = "black"
line_length = 119
.flake8ファイルを作成し,設定を追加
[flake8]
extend-ignore = E203
max-line-length = 119
実行用のコマンドをmakefileで作成
lint:
poetry run flake8 .
poetry run isort --check .
poetry run black --check .
format:
poetry run isort .
poetry run black .
linterチェック時はmake lint, フォーマット時はmake formatを実行する.