Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
6 changes: 6 additions & 0 deletions pyrefly/lib/lsp/wasm/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,12 @@ impl Transaction<'_> {
position,
&mut result,
);
self.add_endpoint_completions(
handle,
mod_module.as_ref(),
position,
&mut result,
);
// in foo(x=<>, y=2<>), the first containing node is AnyNodeRef::Arguments(_)
// in foo(<>), the first containing node is AnyNodeRef::ExprCall
if let Some(first) = nodes.first()
Expand Down
4 changes: 4 additions & 0 deletions pyrefly/lib/state/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ use crate::types::type_var::Restriction;
use crate::types::types::Type;

mod dict_completions;
mod endpoint_support;
mod quick_fixes;

pub(crate) use self::quick_fixes::types::LocalRefactorCodeAction;
Expand Down Expand Up @@ -1720,6 +1721,9 @@ impl<'a> Transaction<'a> {
self.find_definition_for_attribute(handle, base_range, identifier.id(), preference)
}
None => {
if let Some(res) = self.find_definition_for_endpoint_literal(handle, position) {
return res;
}
// Check if this is a None literal, if so, resolve to NoneType class
if covering_nodes
.iter()
Expand Down
Loading
Loading