python: Fix detection of Poetry environments (#20669)

We were missing a .configure call, which let to discrepancies with PET
output.

Release Notes:

- Improved detection of Poetry-based environments
This commit is contained in:
Piotr Osiewicz 2024-11-14 14:54:53 +01:00 committed by GitHub
parent 204a989758
commit a650fe0d77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -413,6 +413,10 @@ impl ToolchainLister for PythonToolchainProvider {
); );
let mut config = Configuration::default(); let mut config = Configuration::default();
config.workspace_directories = Some(vec![worktree_root]); config.workspace_directories = Some(vec![worktree_root]);
for locator in locators.iter() {
locator.configure(&config);
}
let reporter = pet_reporter::collect::create_reporter(); let reporter = pet_reporter::collect::create_reporter();
pet::find::find_and_report_envs(&reporter, config, &locators, &environment, None); pet::find::find_and_report_envs(&reporter, config, &locators, &environment, None);