Commit 0122a95e authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'nyma/black-diff' into 'master'

feat(black): display diff of reformatted files

Closes #127

See merge request to-be-continuous/python!177
parents a6edcd22 34faae46
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -345,6 +345,8 @@ This job **disabled by default** and runs [black](https://black.readthedocs.io)
| ---------------- | ----------------------------------------------------------------------- | ----------------- |
| `black-enabled` / `PYTHON_BLACK_ENABLED` | Set to `true` to enable black job               | _none_ (disabled) |

When `black` detects malformed code, the result is displayed in the job's output log (as a diff).

### `py-isort` job

This job **disabled by default** and runs [isort](https://pycqa.github.io/isort/) on the repo. It is bound to the build stage.
+1 −1
Original line number Diff line number Diff line
@@ -1296,7 +1296,7 @@ py-black:
  script:
    - install_requirements
    - _pip install black
    - _run black . --check --extend-exclude '(\/\.cache\/|\/\.venv\/)'
    - _run black . --check --diff --extend-exclude '(\/\.cache\/|\/\.venv\/)'
  rules:
    # exclude if $PYTHON_BLACK_ENABLED not set
    - if: '$PYTHON_BLACK_ENABLED != "true"'