MLInsider-MLOps/.pre-commit-config.yaml

36 строки
1.0 KiB
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# サンプルで生成されるもの (pre-commit sample-config > .pre-commit-config.yaml)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: no-commit-to-branch
args: [--branch, main]
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
# Python 自動フォーマッター
- repo: https://github.com/ambv/black
rev: 23.1.0
hooks:
- id: black
- id: black-jupyter
language_version: python3
# import 並び替え
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"] # black との競合回避 (他には .isort.cfg にて [tools.isort] profile="black" とする方法もある)
# Python 静的解析ツール
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8