Skip to content

Commit 46171f6

Browse files
Fix CodeActionTriggerKind enum access (#2484)
Co-authored-by: Предраг Николић <[email protected]>
1 parent 0c12435 commit 46171f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/core/views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,10 @@ def text_document_code_action_params(
403403
only_kinds: list[CodeActionKind] | None = None,
404404
manual: bool = False
405405
) -> CodeActionParams:
406+
trigger_kind = CodeActionTriggerKind.Invoked.value if manual else CodeActionTriggerKind.Automatic.value
406407
context: CodeActionContext = {
407408
"diagnostics": diagnostics,
408-
"triggerKind": CodeActionTriggerKind.Invoked if manual else CodeActionTriggerKind.Automatic,
409+
"triggerKind": cast(CodeActionTriggerKind, trigger_kind),
409410
}
410411
if only_kinds:
411412
context["only"] = only_kinds

0 commit comments

Comments
 (0)