Skip to content

Commit 5aee5d7

Browse files
committed
pylint: Implement comma separated --confidence arg completion
1 parent eb21e66 commit 5aee5d7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

completions/pylint

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ _pylint()
5050
return
5151
;;
5252
--confidence)
53-
# TODO comma separated?
53+
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
5454
COMPREPLY=( $( compgen -W "HIGH INFERENCE INFERENCE_FAILURE
55-
UNDEFINED" -- "$cur" ) )
55+
UNDEFINED" -- "${cur##*,}" ) )
56+
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
5657
return
5758
;;
5859
--format|-!(-*)f)

test/lib/completions/pylint.exp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ setup
1414
assert_complete_any "pylint -"
1515
sync_after_int
1616

17+
assert_complete_any "pylint --confidence=HIGH,"
18+
sync_after_int
19+
1720

1821
teardown

0 commit comments

Comments
 (0)