Skip to content
Open
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
5 changes: 5 additions & 0 deletions pyrefly/lib/lsp/non_wasm/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,11 @@ impl Server {
}));
}
};
if let Some(pytest_actions) =
transaction.pytest_fixture_type_annotation_code_actions(&handle, range, import_format)
{
push_refactor_actions(pytest_actions);
}
if let Some(refactors) = transaction.extract_field_code_actions(&handle, range) {
push_refactor_actions(refactors);
}
Expand Down
14 changes: 14 additions & 0 deletions pyrefly/lib/state/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,20 @@ impl<'a> Transaction<'a> {
)
}

pub fn pytest_fixture_type_annotation_code_actions(
&self,
handle: &Handle,
selection: TextRange,
import_format: ImportFormat,
) -> Option<Vec<LocalRefactorCodeAction>> {
quick_fixes::pytest_fixture::pytest_fixture_type_annotation_code_actions(
self,
handle,
selection,
import_format,
)
}

pub fn extract_function_code_actions(
&self,
handle: &Handle,
Expand Down
1 change: 1 addition & 0 deletions pyrefly/lib/state/lsp/quick_fixes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ pub(crate) mod inline_variable;
pub(crate) mod introduce_parameter;
pub(crate) mod move_members;
pub(crate) mod move_module;
pub(crate) mod pytest_fixture;
pub(crate) mod types;
Loading
Loading