v440 2.0.0.dev18__tar.gz → 2.0.0.dev19__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.dev18/src/v440.egg-info → v440-2.0.0.dev19}/PKG-INFO +1 -1
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/pyproject.toml +1 -1
- v440-2.0.0.dev19/src/v440/_utils/Cfg.py +16 -0
- v440-2.0.0.dev19/src/v440/_utils/cfg.toml +9 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Pre.py +3 -14
- {v440-2.0.0.dev18 → v440-2.0.0.dev19/src/v440.egg-info}/PKG-INFO +1 -1
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440.egg-info/SOURCES.txt +2 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/LICENSE.txt +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/MANIFEST.in +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/README.rst +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/setup.cfg +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/__init__.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/BaseList.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/Digest.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/Pattern.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/SimpleQualifierParser.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/SlotList.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/VList.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/__init__.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/_utils/utils.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Base.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Local.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Public.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Qualification.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Release.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/Version.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/VersionError.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/core/__init__.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/tests/__init__.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/tests/test_testdata.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/tests/test_version.py +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440/tests/testdata.toml +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440.egg-info/dependency_links.txt +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440.egg-info/requires.txt +0 -0
- {v440-2.0.0.dev18 → v440-2.0.0.dev19}/src/v440.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import enum
|
|
2
|
+
import functools
|
|
3
|
+
import tomllib
|
|
4
|
+
from importlib import resources
|
|
5
|
+
from typing import *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Cfg(enum.Enum):
|
|
9
|
+
cfg = None
|
|
10
|
+
|
|
11
|
+
@functools.cached_property
|
|
12
|
+
def data(self: Self) -> dict:
|
|
13
|
+
"This cached property holds the cfg data."
|
|
14
|
+
text: str = resources.read_text("v440._utils", "cfg.toml")
|
|
15
|
+
ans: dict = tomllib.loads(text)
|
|
16
|
+
return ans
|
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import *
|
|
4
4
|
|
|
5
5
|
from v440._utils import utils
|
|
6
|
+
from v440._utils.Cfg import Cfg
|
|
6
7
|
from v440._utils.Digest import Digest
|
|
7
8
|
from v440._utils.Pattern import Pattern
|
|
8
9
|
from v440._utils.SlotList import SlotList
|
|
@@ -11,18 +12,6 @@ from v440._utils.utils import guard
|
|
|
11
12
|
__all__ = ["Pre"]
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
PHASEDICT: dict = dict(
|
|
15
|
-
alpha="a",
|
|
16
|
-
a="a",
|
|
17
|
-
beta="b",
|
|
18
|
-
b="b",
|
|
19
|
-
preview="rc",
|
|
20
|
-
pre="rc",
|
|
21
|
-
c="rc",
|
|
22
|
-
rc="rc",
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
15
|
parse_data: Digest = Digest("parse_data")
|
|
27
16
|
|
|
28
17
|
|
|
@@ -38,7 +27,7 @@ def parse_data(value: list) -> Any:
|
|
|
38
27
|
l, n = list(map(utils.segment, value))
|
|
39
28
|
if [l, n] == [None, None]:
|
|
40
29
|
return [None, None]
|
|
41
|
-
l =
|
|
30
|
+
l = Cfg.cfg.data["phases"][l]
|
|
42
31
|
if not isinstance(n, int):
|
|
43
32
|
raise TypeError
|
|
44
33
|
return [l, n]
|
|
@@ -55,7 +44,7 @@ def parse_data(value: str) -> list:
|
|
|
55
44
|
l: Any
|
|
56
45
|
n: Any
|
|
57
46
|
l, n = m.groups()
|
|
58
|
-
l =
|
|
47
|
+
l = Cfg.cfg.data["phases"][l]
|
|
59
48
|
n = 0 if (n is None) else int(n)
|
|
60
49
|
return [l, n]
|
|
61
50
|
|
|
@@ -10,12 +10,14 @@ src/v440.egg-info/dependency_links.txt
|
|
|
10
10
|
src/v440.egg-info/requires.txt
|
|
11
11
|
src/v440.egg-info/top_level.txt
|
|
12
12
|
src/v440/_utils/BaseList.py
|
|
13
|
+
src/v440/_utils/Cfg.py
|
|
13
14
|
src/v440/_utils/Digest.py
|
|
14
15
|
src/v440/_utils/Pattern.py
|
|
15
16
|
src/v440/_utils/SimpleQualifierParser.py
|
|
16
17
|
src/v440/_utils/SlotList.py
|
|
17
18
|
src/v440/_utils/VList.py
|
|
18
19
|
src/v440/_utils/__init__.py
|
|
20
|
+
src/v440/_utils/cfg.toml
|
|
19
21
|
src/v440/_utils/utils.py
|
|
20
22
|
src/v440/core/Base.py
|
|
21
23
|
src/v440/core/Local.py
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|