File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ class ProjectInfo:
24
24
def has_pyproject (self ) -> bool :
25
25
return os .path .isfile ("pyproject.toml" )
26
26
27
+ @property
28
+ def has_uv_lock (self ) -> bool :
29
+ return os .path .isfile ("uv.lock" )
30
+
27
31
@property
28
32
def has_setup (self ) -> bool :
29
33
return os .path .isfile ("setup.py" )
@@ -32,6 +36,10 @@ def has_setup(self) -> bool:
32
36
def has_pre_commit_config (self ) -> bool :
33
37
return os .path .isfile (".pre-commit-config.yaml" )
34
38
39
+ @property
40
+ def is_python_uv (self ) -> bool :
41
+ return self .has_pyproject and self .has_uv_lock
42
+
35
43
@property
36
44
def is_python_poetry (self ) -> bool :
37
45
if not self .has_pyproject :
@@ -236,6 +244,8 @@ def _ask_version_provider(self) -> str:
236
244
if self .project_info .is_python :
237
245
if self .project_info .is_python_poetry :
238
246
default_val = "poetry"
247
+ elif self .project_info .is_python_uv :
248
+ default_val = "uv"
239
249
else :
240
250
default_val = "pep621"
241
251
elif self .project_info .is_rust_cargo :
You can’t perform that action at this time.
0 commit comments