File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,15 @@ runs:
15
15
shell: bash
16
16
17
17
- run : |
18
- MODIFIED_PY_FILES="$(git diff origin/${{ inputs.base_branch }} --diff-filter=MAC --name-only | grep -i '\.py$' | sed -z 's/\n/ /g' )"
18
+ MODIFIED_PY_FILES="$(git diff origin/${{ inputs.base_branch }} --diff-filter=MAC --name-only | grep -i '\.py$' | xargs -r realpath )"
19
19
if [ -n "${MODIFIED_PY_FILES}" ]; then \
20
+ echo "Running black..." ; \
20
21
black ${MODIFIED_PY_FILES} ; \
22
+ echo "Running isort..." ; \
21
23
isort --profile=black ${MODIFIED_PY_FILES} ; \
22
- docformatter --recursive --in-place --wrap-summaries 88 --wrap-descriptions 88 ${MODIFIED_PY_FILES} ; \
24
+ echo "Running docformatter..." ; \
25
+ trap 'docformatter --recursive --in-place --wrap-summaries 88 --wrap-descriptions 88 ${MODIFIED_PY_FILES} || echo "docformatter returned status 3."' EXIT; \
26
+ echo "Running flake8..." ; \
23
27
flake8 --ignore=E203,E501,W503 ${MODIFIED_PY_FILES} ; \
24
28
fi
25
29
shell: bash
You can’t perform that action at this time.
0 commit comments