Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyrefly/lib/lsp/non_wasm/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5451,6 +5451,10 @@ impl Server {
"convert_dict",
transaction.convert_dict_code_actions(&handle, range)
);
timed_refactor_action!(
"unwrap_block",
transaction.unwrap_block_code_actions(&handle, range)
);
timed_refactor_action!(
"pytest_fixture_type_annotation",
transaction.pytest_fixture_type_annotation_code_actions(
Expand Down
8 changes: 8 additions & 0 deletions pyrefly/lib/state/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4190,6 +4190,14 @@ impl<'a> Transaction<'a> {
quick_fixes::convert_dict::convert_dict_code_actions(self, handle, selection)
}

pub fn unwrap_block_code_actions(
&self,
handle: &Handle,
selection: TextRange,
) -> Option<Vec<LocalRefactorCodeAction>> {
quick_fixes::unwrap_block::unwrap_block_code_actions(self, handle, selection)
}

pub fn change_signature_code_actions(
&self,
handle: &Handle,
Expand Down
1 change: 1 addition & 0 deletions pyrefly/lib/state/lsp/quick_fixes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ pub(crate) mod types;
pub(crate) mod unnecessary_type_conversion;
pub(crate) mod unused_ignore;
pub(crate) mod unused_import;
pub(crate) mod unwrap_block;
Loading
Loading