]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/black/action.yml

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '882d8795c6ff65c02f2657e596391748d1b6b7f5'
[etc/vim.git] / .vim / bundle / black / action.yml
1 name: "Black"
2 description: "The uncompromising Python code formatter."
3 author: "Łukasz Langa and contributors to Black"
4 inputs:
5   options:
6     description:
7       "Options passed to Black. Use `black --help` to see available options. Default:
8       '--check --diff'"
9     required: false
10     default: "--check --diff"
11   src:
12     description: "Source to run Black. Default: '.'"
13     required: false
14     default: "."
15   jupyter:
16     description:
17       "Set this option to true to include Jupyter Notebook files. Default: false"
18     required: false
19     default: false
20   black_args:
21     description: "[DEPRECATED] Black input arguments."
22     required: false
23     default: ""
24     deprecationMessage:
25       "Input `with.black_args` is deprecated. Use `with.options` and `with.src` instead."
26   version:
27     description: 'Python Version specifier (PEP440) - e.g. "21.5b1"'
28     required: false
29     default: ""
30 branding:
31   color: "black"
32   icon: "check-circle"
33 runs:
34   using: composite
35   steps:
36     - name: black
37       run: |
38         if [ "$RUNNER_OS" == "Windows" ]; then
39           runner="python"
40         else
41           runner="python3"
42         fi
43
44         out=$(${runner} $GITHUB_ACTION_PATH/action/main.py)
45         exit_code=$?
46
47         # Display the raw output in the step
48         echo "${out}"
49
50         # Display the Markdown output in the job summary
51         echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY
52         echo "${out}" >> $GITHUB_STEP_SUMMARY
53         echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
54
55         # Exit with the exit-code returned by Black
56         exit ${exit_code}
57       env:
58         # TODO: Remove once https://github.com/actions/runner/issues/665 is fixed.
59         INPUT_OPTIONS: ${{ inputs.options }}
60         INPUT_SRC: ${{ inputs.src }}
61         INPUT_JUPYTER: ${{ inputs.jupyter }}
62         INPUT_BLACK_ARGS: ${{ inputs.black_args }}
63         INPUT_VERSION: ${{ inputs.version }}
64         pythonioencoding: utf-8
65       shell: bash