ovld 0.3.9__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- ovld/__init__.py +40 -15
- ovld/core.py +406 -585
- ovld/dependent.py +275 -0
- ovld/mro.py +169 -158
- ovld/recode.py +518 -16
- ovld/typemap.py +383 -0
- ovld/types.py +219 -0
- ovld/utils.py +9 -110
- ovld/version.py +1 -1
- ovld-0.4.0.dist-info/METADATA +213 -0
- ovld-0.4.0.dist-info/RECORD +13 -0
- ovld-0.3.9.dist-info/METADATA +0 -305
- ovld-0.3.9.dist-info/RECORD +0 -10
- {ovld-0.3.9.dist-info → ovld-0.4.0.dist-info}/WHEEL +0 -0
- {ovld-0.3.9.dist-info → ovld-0.4.0.dist-info}/licenses/LICENSE +0 -0
ovld/__init__.py
CHANGED
@@ -1,29 +1,48 @@
|
|
1
|
+
from typing import TYPE_CHECKING
|
2
|
+
|
1
3
|
from .core import (
|
2
|
-
MultiTypeMap,
|
3
4
|
Ovld,
|
4
5
|
OvldBase,
|
5
6
|
OvldCall,
|
6
7
|
OvldMC,
|
7
|
-
TypeMap,
|
8
8
|
extend_super,
|
9
9
|
is_ovld,
|
10
10
|
ovld,
|
11
|
-
|
11
|
+
)
|
12
|
+
from .dependent import (
|
13
|
+
Dependent,
|
14
|
+
DependentType,
|
15
|
+
ParametrizedDependentType,
|
16
|
+
dependent_check,
|
17
|
+
)
|
18
|
+
from .recode import call_next, recurse
|
19
|
+
from .typemap import (
|
20
|
+
MultiTypeMap,
|
21
|
+
TypeMap,
|
22
|
+
)
|
23
|
+
from .types import (
|
24
|
+
Dataclass,
|
25
|
+
Deferred,
|
26
|
+
Exactly,
|
27
|
+
Intersection,
|
28
|
+
StrictSubclass,
|
29
|
+
class_check,
|
30
|
+
parametrized_class_check,
|
12
31
|
)
|
13
32
|
from .utils import (
|
14
33
|
BOOTSTRAP,
|
15
34
|
MISSING,
|
16
|
-
Dataclass,
|
17
35
|
Named,
|
18
|
-
deferred,
|
19
|
-
exactly,
|
20
|
-
has_attribute,
|
21
36
|
keyword_decorator,
|
22
|
-
meta,
|
23
|
-
strict_subclass,
|
24
37
|
)
|
25
38
|
from .version import version as __version__
|
26
39
|
|
40
|
+
if TYPE_CHECKING: # pragma: no cover
|
41
|
+
# Pretend that @ovld is @typing.overload.
|
42
|
+
# I can't believe this works.
|
43
|
+
from typing import overload as ovld
|
44
|
+
|
45
|
+
|
27
46
|
__all__ = [
|
28
47
|
"MultiTypeMap",
|
29
48
|
"Ovld",
|
@@ -34,15 +53,21 @@ __all__ = [
|
|
34
53
|
"extend_super",
|
35
54
|
"is_ovld",
|
36
55
|
"ovld",
|
37
|
-
"
|
56
|
+
"Dependent",
|
57
|
+
"ParametrizedDependentType",
|
58
|
+
"DependentType",
|
59
|
+
"dependent_check",
|
38
60
|
"BOOTSTRAP",
|
39
61
|
"MISSING",
|
40
62
|
"Dataclass",
|
41
63
|
"Named",
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
64
|
+
"Deferred",
|
65
|
+
"Exactly",
|
66
|
+
"Intersection",
|
67
|
+
"StrictSubclass",
|
68
|
+
"class_check",
|
69
|
+
"parametrized_class_check",
|
46
70
|
"keyword_decorator",
|
47
|
-
"
|
71
|
+
"call_next",
|
72
|
+
"recurse",
|
48
73
|
]
|