diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit index 4dde641..2ab3ba1 100755 --- a/.git_hooks/pre-commit +++ b/.git_hooks/pre-commit @@ -1,2 +1,3 @@ -black --line-length=100 $(git diff --cached --name-only --diff-filter=ACM) -git add $(git diff --cached --name-only --diff-filter=ACM) +black --line-length=100 $(git diff --cached --name-only --diff-filter=ACM -- '*.py') +isort --line-length=100 --profile=black --multi-line=3 --trailing-comma $(git diff --cached --name-only --diff-filter=ACM -- '*.py') +git add $(git diff --cached --name-only --diff-filter=ACM -- '*.py') \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dad948f..8f6e49b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,8 @@ stages: formatter: stage: Formatter script: - - pip install black + - pip install black isort + - isort --check --diff --line-length=100 --profile=black --multi-line=3 --trailing-comma ./ - black --check --diff --color --line-length=100 ./ pylint: