v440 2.0.0.dev9__tar.gz → 2.0.0.dev11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {v440-2.0.0.dev9/src/v440.egg-info → v440-2.0.0.dev11}/PKG-INFO +1 -1
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/pyproject.toml +1 -1
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/VList.py +11 -19
- v440-2.0.0.dev11/src/v440/_utils/WList.py +11 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Local.py +5 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Release.py +5 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11/src/v440.egg-info}/PKG-INFO +1 -1
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440.egg-info/SOURCES.txt +0 -1
- v440-2.0.0.dev9/src/v440/_utils/PhasedQualifierParser.py +0 -57
- v440-2.0.0.dev9/src/v440/_utils/WList.py +0 -24
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/LICENSE.txt +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/MANIFEST.in +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/README.rst +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/setup.cfg +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/__init__.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/Digest.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/Pattern.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/SimpleQualifierParser.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/__init__.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/_utils/utils.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Base.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Pre.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Public.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Qualification.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/Version.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/VersionError.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/core/__init__.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/tests/__init__.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/tests/test_testdata.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/tests/test_version.py +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440/tests/testdata.toml +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440.egg-info/dependency_links.txt +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440.egg-info/requires.txt +0 -0
- {v440-2.0.0.dev9 → v440-2.0.0.dev11}/src/v440.egg-info/top_level.txt +0 -0
|
@@ -2,6 +2,7 @@ from typing import *
|
|
|
2
2
|
|
|
3
3
|
from datahold import OkayList
|
|
4
4
|
|
|
5
|
+
from v440._utils import utils
|
|
5
6
|
from v440.core.VersionError import VersionError
|
|
6
7
|
|
|
7
8
|
|
|
@@ -38,10 +39,6 @@ class VList(OkayList):
|
|
|
38
39
|
self.data = self.data * other
|
|
39
40
|
return self
|
|
40
41
|
|
|
41
|
-
def __init__(self: Any, data: Any = None) -> None:
|
|
42
|
-
"This magic method initializes self."
|
|
43
|
-
self.data = data
|
|
44
|
-
|
|
45
42
|
def __le__(self: Self, other: Any, /) -> bool:
|
|
46
43
|
"This magic method implements self<=other."
|
|
47
44
|
ans: bool
|
|
@@ -53,24 +50,19 @@ class VList(OkayList):
|
|
|
53
50
|
ans = self._data <= alt._data
|
|
54
51
|
return ans
|
|
55
52
|
|
|
56
|
-
def __setattr__(self: Self, name: str, value: Any) ->
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
cls: type = type(self)
|
|
62
|
-
attr: Any = getattr(cls, name)
|
|
63
|
-
if type(attr) is not property:
|
|
64
|
-
msg: str = "%r is not a property"
|
|
65
|
-
msg %= name
|
|
66
|
-
raise AttributeError(msg)
|
|
53
|
+
def __setattr__(self: Self, name: str, value: Any) -> Any:
|
|
54
|
+
if name not in type(self).__annotations__.keys():
|
|
55
|
+
return object.__setattr__(self, name, value)
|
|
56
|
+
backup: list = utils.clone(self)
|
|
57
|
+
exc: BaseException
|
|
67
58
|
try:
|
|
68
59
|
object.__setattr__(self, name, value)
|
|
69
|
-
except
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
except BaseException as exc:
|
|
61
|
+
self.data = backup
|
|
62
|
+
if isinstance(exc, VersionError):
|
|
63
|
+
raise
|
|
72
64
|
msg: str = "%r is an invalid value for %r"
|
|
73
|
-
msg %= (value,
|
|
65
|
+
msg %= (value, type(self).__name__ + "." + name)
|
|
74
66
|
raise VersionError(msg)
|
|
75
67
|
|
|
76
68
|
def __sorted__(self: Any, /, **kwargs: Any) -> Self:
|
|
@@ -14,6 +14,11 @@ class Local(VList):
|
|
|
14
14
|
|
|
15
15
|
data: list[int | str]
|
|
16
16
|
|
|
17
|
+
def __init__(self: Any, data: Any = None) -> None:
|
|
18
|
+
"This magic method initializes self."
|
|
19
|
+
self._data = list()
|
|
20
|
+
self.data = data
|
|
21
|
+
|
|
17
22
|
def __le__(self: Self, other: Iterable) -> bool:
|
|
18
23
|
"This magic method implements self<=other."
|
|
19
24
|
ans: bool
|
|
@@ -60,6 +60,11 @@ class Release(VList):
|
|
|
60
60
|
ans: list = list(m)
|
|
61
61
|
return ans
|
|
62
62
|
|
|
63
|
+
def __init__(self: Any, data: Any = None) -> None:
|
|
64
|
+
"This magic method initializes self."
|
|
65
|
+
self._data = list()
|
|
66
|
+
self.data = data
|
|
67
|
+
|
|
63
68
|
@Overloadable
|
|
64
69
|
def __setitem__(self: Self, key: Any, value: Any) -> bool:
|
|
65
70
|
return type(key) is slice
|
|
@@ -11,7 +11,6 @@ src/v440.egg-info/requires.txt
|
|
|
11
11
|
src/v440.egg-info/top_level.txt
|
|
12
12
|
src/v440/_utils/Digest.py
|
|
13
13
|
src/v440/_utils/Pattern.py
|
|
14
|
-
src/v440/_utils/PhasedQualifierParser.py
|
|
15
14
|
src/v440/_utils/SimpleQualifierParser.py
|
|
16
15
|
src/v440/_utils/VList.py
|
|
17
16
|
src/v440/_utils/WList.py
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import *
|
|
4
|
-
|
|
5
|
-
from v440._utils import utils
|
|
6
|
-
from v440._utils.Digest import Digest
|
|
7
|
-
from v440._utils.Pattern import Pattern
|
|
8
|
-
|
|
9
|
-
__all__ = ["PRE"]
|
|
10
|
-
|
|
11
|
-
PHASEDICT: dict = dict(
|
|
12
|
-
alpha="a",
|
|
13
|
-
a="a",
|
|
14
|
-
beta="b",
|
|
15
|
-
b="b",
|
|
16
|
-
preview="rc",
|
|
17
|
-
pre="rc",
|
|
18
|
-
c="rc",
|
|
19
|
-
rc="rc",
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
PRE = Digest("PRE")
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@PRE.overload()
|
|
27
|
-
def PRE() -> list:
|
|
28
|
-
return [None, None]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@PRE.overload(list)
|
|
32
|
-
def PRE(value: list) -> Any:
|
|
33
|
-
l: Any
|
|
34
|
-
n: Any
|
|
35
|
-
l, n = list(map(utils.segment, value))
|
|
36
|
-
if [l, n] == [None, None]:
|
|
37
|
-
return [None, None]
|
|
38
|
-
l = PHASEDICT[l]
|
|
39
|
-
if not isinstance(n, int):
|
|
40
|
-
raise TypeError
|
|
41
|
-
return [l, n]
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@PRE.overload(str)
|
|
45
|
-
def PRE(value: str) -> list:
|
|
46
|
-
if value == "":
|
|
47
|
-
return [None, None]
|
|
48
|
-
v: str = value
|
|
49
|
-
v = v.replace("_", ".")
|
|
50
|
-
v = v.replace("-", ".")
|
|
51
|
-
m: Any = Pattern.PARSER.bound.search(v)
|
|
52
|
-
l: Any
|
|
53
|
-
n: Any
|
|
54
|
-
l, n = m.groups()
|
|
55
|
-
l = PHASEDICT[l]
|
|
56
|
-
n = 0 if (n is None) else int(n)
|
|
57
|
-
return [l, n]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from typing import *
|
|
2
|
-
|
|
3
|
-
from v440._utils import utils
|
|
4
|
-
from v440._utils.VList import VList
|
|
5
|
-
from v440.core.VersionError import VersionError
|
|
6
|
-
|
|
7
|
-
__all__ = ["WList"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class WList(VList):
|
|
11
|
-
def __setattr__(self: Self, name: str, value: Any) -> Any:
|
|
12
|
-
if name not in type(self).__annotations__.keys():
|
|
13
|
-
return object.__setattr__(self, name, value)
|
|
14
|
-
backup: list = utils.clone(self)
|
|
15
|
-
exc: BaseException
|
|
16
|
-
try:
|
|
17
|
-
object.__setattr__(self, name, value)
|
|
18
|
-
except BaseException as exc:
|
|
19
|
-
self.data = backup
|
|
20
|
-
if isinstance(exc, VersionError):
|
|
21
|
-
raise
|
|
22
|
-
msg: str = "%r is an invalid value for %r"
|
|
23
|
-
msg %= (value, type(self).__name__ + "." + name)
|
|
24
|
-
raise VersionError(msg)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|