Skip to content

Commit

Permalink
Fix CodeActionTriggerKind enum access (#2484)
Browse files Browse the repository at this point in the history
Co-authored-by: Предраг Николић <[email protected]>
  • Loading branch information
jwortmann and predragnikolic authored May 29, 2024
1 parent 0c12435 commit 46171f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,10 @@ def text_document_code_action_params(
only_kinds: list[CodeActionKind] | None = None,
manual: bool = False
) -> CodeActionParams:
trigger_kind = CodeActionTriggerKind.Invoked.value if manual else CodeActionTriggerKind.Automatic.value
context: CodeActionContext = {
"diagnostics": diagnostics,
"triggerKind": CodeActionTriggerKind.Invoked if manual else CodeActionTriggerKind.Automatic,
"triggerKind": cast(CodeActionTriggerKind, trigger_kind),
}
if only_kinds:
context["only"] = only_kinds
Expand Down

0 comments on commit 46171f6

Please sign in to comment.