Skip to content

Commit fe69cb5

Browse files
committed
pylint: Option arg completion improvements
1 parent 8d7d24d commit fe69cb5

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

completions/pylint

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ _pylint()
99

1010
case $prev in
1111
--version|--help|--long-help|--help-msg|--init-hook|--ignore|--enable|\
12-
--disable|--evaluation|--max-line-length|--max-module-lines|\
12+
--evaluation|--max-line-length|--max-module-lines|\
1313
--indent-string|--min-similarity-lines|--max-args|\
1414
--ignored-argument-names|--max-locals|--max-returns|--max-branchs|\
1515
--max-statements|--max-parents|--max-attributes|--min-public-methods|\
@@ -20,7 +20,11 @@ _pylint()
2020
--additional-builtins|--notes|--ignored-classes|--generated-members|\
2121
--overgeneral-exceptions|--ignore-iface-methods|\
2222
--defining-attr-methods|--valid-classmethod-first-arg|\
23-
--valid-metaclass-classmethod-first-arg|-!(-*)[hed])
23+
--valid-metaclass-classmethod-first-arg|-!(-*)[he])
24+
return
25+
;;
26+
--disable|-!(-*)d)
27+
COMPREPLY=( $( compgen -W 'all' -- "$cur" ) )
2428
return
2529
;;
2630
--rcfile)
@@ -29,7 +33,8 @@ _pylint()
2933
;;
3034
--persistent|--include-ids|--symbols|--files-output|--reports|\
3135
--comment|--ignore-comments|--ignore-docstrings|--ignore-imports|\
32-
--init-import|--ignore-mixin-members|--zope|-!(-*)[isr])
36+
--init-import|--ignore-mixin-members|--zope|--suggestion-mode|\
37+
-!(-*)[isr])
3338
COMPREPLY=( $( compgen -W 'yes no' -- "$cur" ) )
3439
return
3540
;;
@@ -40,6 +45,16 @@ _pylint()
4045
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
4146
return
4247
;;
48+
--jobs|-!(-*)j)
49+
COMPREPLY=( $( compgen -W "{1..$(_ncpus)}" -- "$cur" ) )
50+
return
51+
;;
52+
--confidence)
53+
# TODO comma separated?
54+
COMPREPLY=( $( compgen -W "HIGH INFERENCE INFERENCE_FAILURE
55+
UNDEFINED" -- "$cur" ) )
56+
return
57+
;;
4358
--format|-!(-*)f)
4459
COMPREPLY=( $( compgen -W 'text parseable colorized msvs html' \
4560
-- "$cur" ) )

0 commit comments

Comments
 (0)