Commit f704b6de authored by Federico Falconieri's avatar Federico Falconieri Committed by Ruben ten Hove
Browse files

feat: isort check job

parent 74da6b6e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ include:

  - local: "python/bandit.yml"
  - local: "python/black.yml"
  - local: "python/isort.yml"
  - local: "python/pip-outdated.yml"
  - local: "python/pytest.yml"
  - local: "python/mypy.yml"

python/isort.yml

0 → 100644
+16 −0
Original line number Diff line number Diff line
---
# isort sorts your imports
# this job will check if your imports follow
# isort profile=black format, for black compatibility
# https://github.com/PyCQA/isort

python:isort:
  stage: test
  image: registry.gitlab.com/notno/python-tests
  variables:
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXCLUDE: ""  # Files/dirs to ignore. For Django use /migrations/
  script:
    - pip show isort
    - isort --check --profile=black --diff --color ${CHECK_PATH} --skip=${EXCLUDE}  # yamllint disable-line rule:line-length
  needs: []