]> git.madduck.net Git - etc/vim.git/blob - 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:

Remove blank lines before class docstring (#3692)
[etc/vim.git] / 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           python $GITHUB_ACTION_PATH/action/main.py | tee -a $GITHUB_STEP_SUMMARY
40         else
41           python3 $GITHUB_ACTION_PATH/action/main.py | tee -a $GITHUB_STEP_SUMMARY
42         fi
43       env:
44         # TODO: Remove once https://github.com/actions/runner/issues/665 is fixed.
45         INPUT_OPTIONS: ${{ inputs.options }}
46         INPUT_SRC: ${{ inputs.src }}
47         INPUT_JUPYTER: ${{ inputs.jupyter }}
48         INPUT_BLACK_ARGS: ${{ inputs.black_args }}
49         INPUT_VERSION: ${{ inputs.version }}
50         pythonioencoding: utf-8
51       shell: bash