Skip to content

Commit

Permalink
pylint: Implement comma separated --confidence arg completion
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jun 23, 2018
1 parent eb21e66 commit 5aee5d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions completions/pylint
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ _pylint()
return
;;
--confidence)
# TODO comma separated?
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
COMPREPLY=( $( compgen -W "HIGH INFERENCE INFERENCE_FAILURE
UNDEFINED" -- "$cur" ) )
UNDEFINED" -- "${cur##*,}" ) )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
--format|-!(-*)f)
Expand Down
3 changes: 3 additions & 0 deletions test/lib/completions/pylint.exp
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ setup
assert_complete_any "pylint -"
sync_after_int

assert_complete_any "pylint --confidence=HIGH,"
sync_after_int


teardown

0 comments on commit 5aee5d7

Please sign in to comment.