Skip to content

Commit c95acf7

Browse files
committed
support dict pins
1 parent f0fd56d commit c95acf7

File tree

1 file changed

+4
-1
lines changed
  • minimum_versions/environments

1 file changed

+4
-1
lines changed

minimum_versions/environments/pixi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
tight_pin_re = re.compile(rf">=(?P<lower>{_version_re}),<(?P<upper>{_version_re})")
1414

1515

16-
def parse_spec(name, version_text):
16+
def parse_spec(name, version_text: str | dict):
1717
# "*" => None
1818
# "x.y.*" => "x.y"
1919
# ">=x.y.0,<x.(y + 1).0" => "x.y" (+ warning)
2020
# ">=x.y.*" => "x.y" (+ warning)
2121

22+
if isinstance(version_text, dict):
23+
version_text = version_text.get("version", "*")
24+
2225
warnings = []
2326
if version_text == "*":
2427
raw_version = None

0 commit comments

Comments
 (0)