Advertisement
Guest User

catalyst pre-commit

a guest
Feb 25th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.73 KB | None | 0 0
  1. yapf.....................................................................Failed
  2. hookid: yapf
  3.  
  4. Files were modified by this hook. Additional output:
  5.  
  6. # this stops git rev-parse from failing if we run this from the .git directory
  7. builtin cd "$(dirname "${BASH_SOURCE:-$0}")"
  8. dirname "${BASH_SOURCE:-$0}"
  9.  
  10. ROOT="$(git rev-parse --show-toplevel)"
  11. git rev-parse --show-toplevel
  12. builtin cd "$ROOT" || exit 1
  13.  
  14.  
  15. YAPF_FLAGS=(
  16.     '--style' "$ROOT/setup.cfg"
  17.     '--recursive'
  18.     '--parallel'
  19. )
  20.  
  21. YAPF_EXCLUDES=(
  22.     '--exclude' 'docker/*'
  23. )
  24.  
  25. # Format specified files
  26. format() {
  27.     yapf --in-place "${YAPF_FLAGS[@]}" -- "$@"
  28. }
  29.  
  30. # Format all files, and print the diff to stdout for travis.
  31. format_all() {
  32.     yapf --diff "${YAPF_FLAGS[@]}" "${YAPF_EXCLUDES[@]}" .
  33. }
  34.  
  35. format_all_in_place() {
  36.     yapf --in-place "${YAPF_FLAGS[@]}" "${YAPF_EXCLUDES[@]}" .
  37. }
  38.  
  39. # This flag formats individual files. --files *must* be the first command line
  40. # arg to use this option.
  41. if [[ "$1" == '--files' ]]; then
  42.     format "${@:2}"
  43.     # If `--all` is passed, then any further arguments are ignored and the
  44.     # entire python directory is formatted.
  45. elif [[ "$1" == '--all' ]]; then
  46.     format_all
  47. elif [[ "$1" == '--all-in-place' ]]; then
  48.     format_all_in_place
  49. else
  50.     # Format only the files that changed in last commit.
  51.     exit 1
  52. fi
  53.  
  54. seed isort known_third_party.............................................Passed
  55. isort....................................................................Passed
  56. Check Yaml...........................................(no files to check)Skipped
  57. Trim Trailing Whitespace.................................................Passed
  58. Flake8...................................................................Passed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement