Functions
parse_version(string: str, version_type: Type[Version] = Version) -> Version
Parses a string
into a version of version_type
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
The string to parse. |
required |
version_type |
Type[Version]
|
The version type to use in conversion. |
Version
|
Returns:
Type | Description |
---|---|
Version
|
The newly parsed |
Source code in versions/functions.py
28 29 30 31 32 33 34 35 36 37 38 39 |
|
parse_specifier(string: str, version_type: Type[Version] = Version) -> Specifier
Parses a string
into a version specifier with versions of version_type
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
The string to parse. |
required |
version_type |
Type[Version]
|
The version type to use in conversion. |
Version
|
Returns:
Type | Description |
---|---|
Specifier
|
The newly parsed |
Source code in versions/functions.py
42 43 44 45 46 47 48 49 50 51 52 53 |
|
parse_version_set(string: str, version_type: Type[Version] = Version) -> VersionSet
Parses a string
into a version set with versions of version_type
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
The string to parse. |
required |
version_type |
Type[Version]
|
The version type to use in conversion. |
Version
|
Returns:
Type | Description |
---|---|
VersionSet
|
The newly parsed |
Source code in versions/functions.py
56 57 58 59 60 61 62 63 64 65 66 67 |
|