Fix stubsabot handling of post releases (#10667)

Fixes #10666
This commit is contained in:
Shantanu
2023-09-06 03:06:07 -07:00
committed by GitHub
parent fed788f2eb
commit a3f4418e90

View File

@@ -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]