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.
2 description: "The uncompromising Python code formatter."
3 author: "Łukasz Langa and contributors to Black"
7 "Options passed to Black. Use `black --help` to see available options. Default:
10 default: "--check --diff"
12 description: "Source to run Black. Default: '.'"
16 description: "[DEPRECATED] Black input arguments."
20 "Input `with.black_args` is deprecated. Use `with.options` and `with.src` instead."
22 description: 'Python Version specifier (PEP440) - e.g. "21.5b1"'
32 # Exists since using github.action_path + path to main script doesn't work because bash
33 # interprets the backslashes in github.action_path (which are used when the runner OS
34 # is Windows) destroying the path to the target file.
36 # Also semicolons are necessary because I can't get the newlines to work
37 entrypoint="import sys;
39 from pathlib import Path;
41 MAIN_SCRIPT = Path(r'${{ github.action_path }}') / 'action' / 'main.py';
43 proc = subprocess.run([sys.executable, str(MAIN_SCRIPT)]);
44 sys.exit(proc.returncode)
47 if [ "$RUNNER_OS" == "Windows" ]; then
48 echo $entrypoint | python
50 echo $entrypoint | python3
53 # TODO: Remove once https://github.com/actions/runner/issues/665 is fixed.
54 INPUT_OPTIONS: ${{ inputs.options }}
55 INPUT_SRC: ${{ inputs.src }}
56 INPUT_BLACK_ARGS: ${{ inputs.black_args }}
57 INPUT_VERSION: ${{ inputs.version }}
58 pythonioencoding: utf-8