diff options
author | Monty Taylor <mordred@inaugust.com> | 2019-08-01 10:44:08 -0400 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2019-12-12 14:56:39 +0000 |
commit | e7cc5efd20dc49a24e6bec36f2d9ea9e9ab28128 (patch) | |
tree | 4c23a7cff60001f63a908250e58b1f4006bb4b47 /tools | |
parent | 2e7a0088c27ca2b6418a4f9109bb8a6a001602ce (diff) | |
download | nova-e7cc5efd20dc49a24e6bec36f2d9ea9e9ab28128.tar.gz |
Keep pre-commit inline with hacking and fix whitespace
The flake8 hook for pre-commit installs its own flake8 which is
not what hacking is pinned to. This results in a bunch of errors.
By doing a local hook we can cause these to be the same.
There are flake8 exclusions in tox.ini that need to be used
in pre-commit. Also we should exclude svg files from the whitespace
modifications, because who cares.
Once those are fixed, running pre-commit -a fixes some whitespace
issues. While the normal use isn't to run -a - if someone does make
a patch that touches any of these they'll get erroneous unrelated
errors compared to their lower work - so fix all of the existing
issues, which are mostly space-at-end-of-line issues it seems.
Change-Id: I78e753492e99c03b30a0a691db3bd75ee3d289c9
Diffstat (limited to 'tools')
-rw-r--r-- | tools/nova-manage.bash_completion | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/nova-manage.bash_completion b/tools/nova-manage.bash_completion index 053d41950b..0088a522fe 100644 --- a/tools/nova-manage.bash_completion +++ b/tools/nova-manage.bash_completion @@ -13,25 +13,25 @@ _get_nova_manage_subopts () { _nova_manage() { - local cur prev subopts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" + local cur prev subopts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" - if [ "x$_nova_manage_opts" == "x" ] ; then - _nova_manage_opts="`nova-manage bash-completion 2>/dev/null`" - _nova_manage_opts_exp="`echo $_nova_manage_opts | sed -e "s/\s/|/g"`" - fi + if [ "x$_nova_manage_opts" == "x" ] ; then + _nova_manage_opts="`nova-manage bash-completion 2>/dev/null`" + _nova_manage_opts_exp="`echo $_nova_manage_opts | sed -e "s/\s/|/g"`" + fi - if [[ " `echo $_nova_manage_opts` " =~ " $prev " ]] ; then - if [ "x$(_get_nova_manage_subopts "$prev")" == "x" ] ; then - subopts="`nova-manage bash-completion $prev 2>/dev/null`" - _set_nova_manage_subopts "$prev" "$subopts" - fi - COMPREPLY=($(compgen -W "$(_get_nova_manage_subopts "$prev")" -- ${cur})) - elif [[ ! " ${COMP_WORDS[@]} " =~ " "($_nova_manage_opts_exp)" " ]] ; then - COMPREPLY=($(compgen -W "${_nova_manage_opts}" -- ${cur})) - fi - return 0 + if [[ " `echo $_nova_manage_opts` " =~ " $prev " ]] ; then + if [ "x$(_get_nova_manage_subopts "$prev")" == "x" ] ; then + subopts="`nova-manage bash-completion $prev 2>/dev/null`" + _set_nova_manage_subopts "$prev" "$subopts" + fi + COMPREPLY=($(compgen -W "$(_get_nova_manage_subopts "$prev")" -- ${cur})) + elif [[ ! " ${COMP_WORDS[@]} " =~ " "($_nova_manage_opts_exp)" " ]] ; then + COMPREPLY=($(compgen -W "${_nova_manage_opts}" -- ${cur})) + fi + return 0 } complete -F _nova_manage nova-manage |