Skip to content

Commit

Permalink
Fix CodeActionTriggerKind enum access
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed May 28, 2024
1 parent fc5a7c7 commit 5a2d6ad
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 5a2d6ad

Please sign in to comment.