Skip to content

Conversation

@DonJayamanne
Copy link
Collaborator

No description provided.

"env.bak",
"venv.bak",
"Scripts", // If the folder ends bin/scripts, then ignore it, as the parent is most likely an env.
"bin", // If the folder ends bin/scripts, then ignore it, as the parent is most likely an env.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore searching some known directories

) -> Option<ResolvedEnvironment> {
// First check if this is a known environment
let env = PythonEnv::new(executable.to_owned(), None, None);
if let Some(env) = identify_python_environment_using_locators(&env, locators) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve


let mut handlers = HandlersKeyedByMethodName::new(Arc::new(context));
handlers.add_request_handler("refresh", handle_refresh);
handlers.add_request_handler("resolve", handle_resolve);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add resolve request

// if the prefix is not defined, try to get this.
// For instance, if the file is bin/python or Scripts/python
// And we have a pyvenv.cfg file in the parent directory, then we can get the prefix.
if prefix.is_none() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix caught via CI

.unwrap_or_default();
}
if let Some(project) = &self.project {
writeln!(f, " Project : {}", project.to_str().unwrap()).unwrap_or_default();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor refactor

@DonJayamanne DonJayamanne marked this pull request as ready for review June 17, 2024 17:22
Copy link
Member

@karthiknadig karthiknadig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling.

@DonJayamanne DonJayamanne enabled auto-merge (squash) June 17, 2024 22:43
@DonJayamanne DonJayamanne merged commit 8cf3388 into main Jun 17, 2024
@DonJayamanne DonJayamanne deleted the wipx branch June 17, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants