File tree Expand file tree Collapse file tree
src/main/kotlin/space/whitememory/pythoninlayparams Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33## [ Unreleased]
44### Changed
55- Hide the hints that are 1 character long
6- - Don't show hints in call expressions that take a single parameter
6+ - Don't show hints in call expressions that take a single parameter (except for ` *args ` )
77
88### Fixed
99- Hints showing when placing a positional argument after keyword ones
Original file line number Diff line number Diff line change @@ -75,8 +75,11 @@ class PythonInlayHintsProvider : InlayParameterHintsProvider {
7575 }
7676
7777 if (finalParameters.size == 1 ) {
78- // Don't need a hint if there's only one parameter
79- return inlayInfos
78+ // Don't need a hint if there's only one parameter,
79+ // Make an exception for *args
80+ finalParameters[0 ].let {
81+ if (it !is PyNamedParameter || ! it.isPositionalContainer) return inlayInfos
82+ }
8083 }
8184
8285 finalParameters.zip(element.arguments).forEach { (param, arg) ->
You can’t perform that action at this time.
0 commit comments