aboutcode-org / aboutcode-org/univers
Semver 2.0 != 2.0.0 and 2.0.0.0 is valid
- Ngôn ngữ chính
- Python
- Star
- 50
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Code docs say
https://github.com/nexB/univers/blob/a52ea9900d87ef6cd0ed989bf20a41a794cf39c4/src/univers/versions.py#L177-L180
Even so, semver with more than 3 segments is treated as valid. This looks like an issue on the `semantic_version` side but we should not make false promises.
```py
>>> from univers.versions import SemverVersion
>>> SemverVersion.is_valid("2")
True
>>> SemverVersion.is_valid("2.0")
True
>>> SemverVersion.is_valid("2.0.0")
True
>>> SemverVersion.is_valid("2.0.0.0")
True
>>> SemverVersion.is_valid("2.0.0.0.1")
True
>>> SemverVersion("2") == SemverVersion("2.0")
False
>>> SemverVersion("2.0.0") == SemverVersion("2.0")
False
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.