Commit ac5d4a91 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

python: add an autopep8 formatter

parent fe43871a
kind: "autopep8"
script: "/PATH/TO/format.autopep8"
- "tox.ini"
- "setup.cfg"
# This formatter uses the `autopep8` tool to perform formatting checks of files
# written in Python.
# It uses the `autopep8` executable in `$PATH`. The configuration file may be
# named `tox.ini` or `setup.cfg` for `autopep8`, but are optional, but are used
# if they exist.
set -e
readonly path="$1"
if ! [ -f "$path" ]; then
echo >&2 'error: could not find file to format: '"$path"
exit 4
if ! which "autopep8" > /dev/null; then
echo >&2 'error: could not find the `autopep8` binary'
exit 3
exec autopep8 --in-place "$path"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment