Skip to content

Commit 2788535

Browse files
committed
allow python pin and python find to handle full virtual pyprojects
1 parent af55c95 commit 2788535

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

crates/uv/src/commands/python/find.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ pub(crate) async fn find(
4343
let project = if no_project {
4444
None
4545
} else {
46-
match VirtualProject::discover(project_dir, &DiscoveryOptions::default(), &workspace_cache)
47-
.await
46+
match VirtualProject::discover_defaulted(
47+
project_dir,
48+
&DiscoveryOptions::default(),
49+
&workspace_cache,
50+
)
51+
.await
4852
{
4953
Ok(project) => Some(project),
5054
Err(WorkspaceError::MissingProject(_)) => None,

crates/uv/src/commands/python/pin.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ pub(crate) async fn pin(
4545
let virtual_project = if no_project {
4646
None
4747
} else {
48-
match VirtualProject::discover(project_dir, &DiscoveryOptions::default(), &workspace_cache)
49-
.await
48+
match VirtualProject::discover_defaulted(
49+
project_dir,
50+
&DiscoveryOptions::default(),
51+
&workspace_cache,
52+
)
53+
.await
5054
{
5155
Ok(virtual_project) => Some(virtual_project),
5256
Err(err) => {

0 commit comments

Comments
 (0)