Skip to content

Instantly share code, notes, and snippets.

@evilkost
Created September 6, 2023 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilkost/43c9202504c9a938d8b9314caf1c2d65 to your computer and use it in GitHub Desktop.
Save evilkost/43c9202504c9a938d8b9314caf1c2d65 to your computer and use it in GitHub Desktop.
isort_run:
deps: [ ensure_venv ]
dotenv:
- .env
shell: bash
vars:
CHECK_FLAG:
sh: check_flag="--check"; if [ '{{.APPLY_FIX}}' == 'true' ]; then check_flag=""; fi; echo $check_flag
cmds:
- for: { var: TARGET, as: FILE }
cmd: |
. $VENV_PATH/bin/activate
cd {{.ROOT_DIR}}
isort "{{.FILE}}" "{{.CHECK_FLAG}}"
silent: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment