mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Correct is_allowed_version()'s example tests (#10802)
This commit is contained in:
@@ -45,11 +45,11 @@ def is_allowed_version(spec: str, version: str) -> bool:
|
||||
|
||||
Some examples:
|
||||
|
||||
>>> is_allowed_version('3.3', '<=3.5')
|
||||
>>> is_allowed_version('<=3.5', '3.3')
|
||||
True
|
||||
>>> is_allowed_version('3.3', '<=3.2')
|
||||
>>> is_allowed_version('<=3.2', '3.3')
|
||||
False
|
||||
>>> is_allowed_version('3.3', '>3.2, <4.0')
|
||||
>>> is_allowed_version('>3.2, <4.0', '3.3')
|
||||
True
|
||||
"""
|
||||
return Version(version) in SpecifierSet(spec)
|
||||
|
||||
Reference in New Issue
Block a user