Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- yapf.....................................................................Failed
- hookid: yapf
- Files were modified by this hook. Additional output:
- # this stops git rev-parse from failing if we run this from the .git directory
- builtin cd "$(dirname "${BASH_SOURCE:-$0}")"
- dirname "${BASH_SOURCE:-$0}"
- ROOT="$(git rev-parse --show-toplevel)"
- git rev-parse --show-toplevel
- builtin cd "$ROOT" || exit 1
- YAPF_FLAGS=(
- '--style' "$ROOT/setup.cfg"
- '--recursive'
- '--parallel'
- )
- YAPF_EXCLUDES=(
- '--exclude' 'docker/*'
- )
- # Format specified files
- format() {
- yapf --in-place "${YAPF_FLAGS[@]}" -- "$@"
- }
- # Format all files, and print the diff to stdout for travis.
- format_all() {
- yapf --diff "${YAPF_FLAGS[@]}" "${YAPF_EXCLUDES[@]}" .
- }
- format_all_in_place() {
- yapf --in-place "${YAPF_FLAGS[@]}" "${YAPF_EXCLUDES[@]}" .
- }
- # This flag formats individual files. --files *must* be the first command line
- # arg to use this option.
- if [[ "$1" == '--files' ]]; then
- format "${@:2}"
- # If `--all` is passed, then any further arguments are ignored and the
- # entire python directory is formatted.
- elif [[ "$1" == '--all' ]]; then
- format_all
- elif [[ "$1" == '--all-in-place' ]]; then
- format_all_in_place
- else
- # Format only the files that changed in last commit.
- exit 1
- fi
- seed isort known_third_party.............................................Passed
- isort....................................................................Passed
- Check Yaml...........................................(no files to check)Skipped
- Trim Trailing Whitespace.................................................Passed
- Flake8...................................................................Passed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement