mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 12:44:33 +08:00
1 parent
fed788f2eb
commit
a3f4418e90
1 file changed
+1
-1
@@ -223,7 +223,7 @@ def get_updated_version_spec(spec: str, version: packaging.version.Version) -> s
|
||||
spec="1.1.1.*", version="1.2.3" -> "1.2.3.*"
|
||||
"""
|
||||
if not spec.endswith(".*"):
|
||||
return _check_spec(version.base_version, version)
|
||||
return _check_spec(str(version), version)
|
||||
|
||||
specificity = spec.count(".") if spec.removesuffix(".*") else 0
|
||||
rounded_version = version.base_version.split(".")[:specificity]
|
||||
|
||||
Reference in new issue
Block a user