Format: application/octet-stream
1 from abc import abstractmethod
2 from typing import Optional, Pattern, Text, Tuple, TypeVar, Union
3
4 _T = TypeVar("_T", bound=Version)
5
6 class Version:
7 def __repr__(self) -> str: ...
8 @abstractmethod
9 def __init__(self, vstring: Optional[Text] = ...) -> None: ...
10 @abstractmethod
11 def parse(self: _T, vstring: Text) -> _T: ...
12 @abstractmethod
13 def __str__(self) -> str: ...
14 @abstractmethod
15 def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...
16
17 class StrictVersion(Version):
18 version_re: Pattern[str]
19 version: Tuple[int, int, int]
20 prerelease: Optional[Tuple[Text, int]]
21 def __init__(self, vstring: Optional[Text] = ...) -> None: ...
22 def parse(self: _T, vstring: Text) -> _T: ...
23 def __str__(self) -> str: ...
24 def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...
25
26 class LooseVersion(Version):
27 component_re: Pattern[str]
28 vstring: Text
29 version: Tuple[Union[Text, int], ...]
30 def __init__(self, vstring: Optional[Text] = ...) -> None: ...
31 def parse(self: _T, vstring: Text) -> _T: ...
32 def __str__(self) -> str: ...
33 def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...
34