ovld 0.4.5__tar.gz → 0.4.6__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.
- {ovld-0.4.5 → ovld-0.4.6}/.github/workflows/python-package.yml +3 -0
- ovld-0.4.6/.python-version +1 -0
- {ovld-0.4.5 → ovld-0.4.6}/PKG-INFO +1 -1
- {ovld-0.4.5 → ovld-0.4.6}/bench.py +0 -1
- ovld-0.4.6/ichk.py +39 -0
- {ovld-0.4.5 → ovld-0.4.6}/pyproject.toml +1 -1
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/dependent.py +2 -1
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/mro.py +5 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/types.py +11 -7
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/utils.py +11 -0
- ovld-0.4.6/src/ovld/version.py +1 -0
- ovld-0.4.6/tests/__init__.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld.py +23 -0
- {ovld-0.4.5 → ovld-0.4.6}/typo.py +13 -2
- {ovld-0.4.5 → ovld-0.4.6}/uv.lock +1 -1
- ovld-0.4.5/.python-version +0 -1
- ovld-0.4.5/src/ovld/version.py +0 -1
- {ovld-0.4.5 → ovld-0.4.6}/.bsync-snap-20220324145902.852076 +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/.bsync-snap-20240916114026.355340 +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/.envrc +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/.gitignore +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/.readthedocs.yaml +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/LICENSE +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/README.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/add.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/anal.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/beary.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/bench/requirements.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchd.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/__init__.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/common.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_add.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_ast.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_calc.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_fib.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_multer.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_regexp.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_trivial.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_tuple.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_tweaknum.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/benchmarks/test_typechecking.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/cloz.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/coco.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/data.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/didi.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/compare.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/dependent.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/features.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/index.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/types.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/docs/usage.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/doo.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/edges.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/explore.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/facto.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/gen_comparison_table.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/gen_typecheck_table.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/gentest.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/hello.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/hntest.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/klos.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/kraken.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/mkdocs.yml +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/nxt.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.0-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.0.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.1-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.1.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.2-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.2.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.3-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.3.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.4-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.4.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.5-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.5.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.6-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.6.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.7-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.7.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.8-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.8.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.9-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.1.9.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.0-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.0.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.1-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.1.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.10-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.10.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.11-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.11.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.2-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.2.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.3-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.3.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.4-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.4.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.5-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.5.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.6-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.6.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.7-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.7.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.8-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.8.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.9-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.2.9.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.0-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.0.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.1-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.1.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.2-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.2.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.3-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.3.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.4-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.4.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.5-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.5.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.8-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.8.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.9-py3-none-any.whl +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/old-dist/ovld-0.3.9.tar.gz +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/one_two_three.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/outoftheway.toml +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/reddit.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/reddit.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/refun.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/reper.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/__init__.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/abc.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/core.py +0 -0
- /ovld-0.4.5/tests/__init__.py → /ovld-0.4.6/src/ovld/py.typed +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/recode.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/src/ovld/typemap.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/stuff.md +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tb.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tensor.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/modules/gingerbread.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_abc.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_dependent.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_examples.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_global.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_mro.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld/test_display.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld/test_display_more.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld/test_doc.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld/test_doc2.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_ovld/test_method_doc.txt +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_typemap.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_types.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/tests/test_utils.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/todo.q +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/toot.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/world.yaml +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/x.py +0 -0
- {ovld-0.4.5 → ovld-0.4.6}/zaggo +0 -0
@@ -40,6 +40,8 @@ jobs:
|
|
40
40
|
- python: '3.11'
|
41
41
|
coverage: false
|
42
42
|
- python: '3.12'
|
43
|
+
coverage: false
|
44
|
+
- python: '3.13'
|
43
45
|
coverage: true
|
44
46
|
steps:
|
45
47
|
- name: Check out the code
|
@@ -70,6 +72,7 @@ jobs:
|
|
70
72
|
- python: '3.10'
|
71
73
|
- python: '3.11'
|
72
74
|
- python: '3.12'
|
75
|
+
- python: '3.13'
|
73
76
|
steps:
|
74
77
|
- name: Check out the code
|
75
78
|
uses: actions/checkout@v3
|
@@ -0,0 +1 @@
|
|
1
|
+
3.13
|
ovld-0.4.6/ichk.py
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
from ovld.types import Dataclass
|
2
|
+
|
3
|
+
|
4
|
+
class metatron(type):
|
5
|
+
def __subclasscheck__(cls, c):
|
6
|
+
return True
|
7
|
+
|
8
|
+
# def __instancecheck__(cls, arg):
|
9
|
+
# print(cls)
|
10
|
+
# return arg == 3
|
11
|
+
|
12
|
+
|
13
|
+
class A(metaclass=metatron):
|
14
|
+
pass
|
15
|
+
|
16
|
+
|
17
|
+
class B:
|
18
|
+
pass
|
19
|
+
|
20
|
+
|
21
|
+
class C:
|
22
|
+
pass
|
23
|
+
|
24
|
+
|
25
|
+
print(issubclass(B, A))
|
26
|
+
print(isinstance(B(), A))
|
27
|
+
# print(isinstance(3, A))
|
28
|
+
|
29
|
+
|
30
|
+
def see(x):
|
31
|
+
ichk = type(x).__instancecheck__
|
32
|
+
print(id(ichk), ichk)
|
33
|
+
|
34
|
+
|
35
|
+
see(Dataclass)
|
36
|
+
see(A)
|
37
|
+
see(C)
|
38
|
+
see(object)
|
39
|
+
see(int)
|
@@ -15,6 +15,7 @@ from .types import (
|
|
15
15
|
Intersection,
|
16
16
|
Order,
|
17
17
|
clsstring,
|
18
|
+
get_args,
|
18
19
|
normalize_type,
|
19
20
|
subclasscheck,
|
20
21
|
typeorder,
|
@@ -61,7 +62,7 @@ def combine(master_template, args):
|
|
61
62
|
def is_dependent(t):
|
62
63
|
if isinstance(t, DependentType):
|
63
64
|
return True
|
64
|
-
elif any(is_dependent(subt) for subt in
|
65
|
+
elif any(is_dependent(subt) for subt in get_args(t)):
|
65
66
|
return True
|
66
67
|
return False
|
67
68
|
|
@@ -3,6 +3,8 @@ from enum import Enum
|
|
3
3
|
from graphlib import TopologicalSorter
|
4
4
|
from typing import get_args, get_origin
|
5
5
|
|
6
|
+
from .utils import UnionTypes
|
7
|
+
|
6
8
|
|
7
9
|
class Order(Enum):
|
8
10
|
LESS = -1
|
@@ -121,6 +123,9 @@ def subclasscheck(t1, t2):
|
|
121
123
|
):
|
122
124
|
return result
|
123
125
|
|
126
|
+
if t2 in UnionTypes:
|
127
|
+
return isinstance(t1, t2)
|
128
|
+
|
124
129
|
o1 = get_origin(t1)
|
125
130
|
o2 = get_origin(t2)
|
126
131
|
|
@@ -3,16 +3,18 @@ import sys
|
|
3
3
|
import typing
|
4
4
|
from dataclasses import dataclass
|
5
5
|
from functools import partial
|
6
|
-
from typing import Protocol, runtime_checkable
|
6
|
+
from typing import Protocol, get_args, runtime_checkable
|
7
7
|
|
8
8
|
from .mro import Order, TypeRelationship, subclasscheck, typeorder
|
9
9
|
from .typemap import TypeMap
|
10
|
-
from .utils import UsageError, clsstring
|
10
|
+
from .utils import UnionType, UnionTypes, UsageError, clsstring
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
|
13
|
+
def get_args(tp):
|
14
|
+
args = getattr(tp, "__args__", None)
|
15
|
+
if not isinstance(args, tuple):
|
16
|
+
args = ()
|
17
|
+
return args
|
16
18
|
|
17
19
|
|
18
20
|
class TypeNormalizer:
|
@@ -37,6 +39,8 @@ class TypeNormalizer:
|
|
37
39
|
t = object
|
38
40
|
elif t is inspect._empty:
|
39
41
|
t = object
|
42
|
+
elif t in UnionTypes:
|
43
|
+
return type[t]
|
40
44
|
elif isinstance(t, typing._AnnotatedAlias):
|
41
45
|
t = t.__origin__
|
42
46
|
|
@@ -82,7 +86,7 @@ class MetaMC(type):
|
|
82
86
|
return super().__new__(T, name, (), {"_handler": handler})
|
83
87
|
|
84
88
|
def __init__(cls, name, handler):
|
85
|
-
cls.__args__ =
|
89
|
+
cls.__args__ = get_args(handler)
|
86
90
|
|
87
91
|
def codegen(cls):
|
88
92
|
return cls._handler.codegen()
|
@@ -5,6 +5,15 @@ import re
|
|
5
5
|
import typing
|
6
6
|
from itertools import count
|
7
7
|
|
8
|
+
try:
|
9
|
+
from types import UnionType
|
10
|
+
|
11
|
+
UnionTypes = (type(typing.Union[int, str]), UnionType)
|
12
|
+
|
13
|
+
except ImportError: # pragma: no cover
|
14
|
+
UnionType = None
|
15
|
+
UnionTypes = (type(typing.Union[int, str]),)
|
16
|
+
|
8
17
|
|
9
18
|
class Named:
|
10
19
|
"""A named object.
|
@@ -90,6 +99,8 @@ def clsstring(cls):
|
|
90
99
|
def subtler_type(obj):
|
91
100
|
if isinstance(obj, GenericAlias):
|
92
101
|
return type[obj]
|
102
|
+
elif isinstance(obj, UnionTypes):
|
103
|
+
return type[obj]
|
93
104
|
elif obj is typing.Any:
|
94
105
|
return type[object]
|
95
106
|
elif isinstance(obj, type):
|
@@ -0,0 +1 @@
|
|
1
|
+
version = "0.4.6"
|
File without changes
|
@@ -18,6 +18,7 @@ from ovld import (
|
|
18
18
|
recurse,
|
19
19
|
)
|
20
20
|
from ovld.dependent import Dependent, Equals, StartsWith
|
21
|
+
from ovld.types import UnionTypes
|
21
22
|
from ovld.utils import MISSING, UsageError
|
22
23
|
|
23
24
|
from .test_typemap import Animal, Bird, Mammal
|
@@ -1240,6 +1241,28 @@ def test_type_any():
|
|
1240
1241
|
assert f(typing.Any) == "yes"
|
1241
1242
|
|
1242
1243
|
|
1244
|
+
UT = type(typing.Union[int, str])
|
1245
|
+
|
1246
|
+
|
1247
|
+
@pytest.mark.skipif(
|
1248
|
+
sys.version_info < (3, 10),
|
1249
|
+
reason="union syntax requires python3.10 or higher",
|
1250
|
+
)
|
1251
|
+
def test_union_catchall():
|
1252
|
+
@ovld
|
1253
|
+
def f(t: UnionTypes):
|
1254
|
+
return "yes"
|
1255
|
+
|
1256
|
+
@ovld
|
1257
|
+
def f(t: type[object]):
|
1258
|
+
return "no"
|
1259
|
+
|
1260
|
+
assert f(typing.Optional[float]) == "yes"
|
1261
|
+
assert f(typing.Union[int, str]) == "yes"
|
1262
|
+
assert f(int | str) == "yes"
|
1263
|
+
assert f(int) == "no"
|
1264
|
+
|
1265
|
+
|
1243
1266
|
def test_annotated():
|
1244
1267
|
@ovld
|
1245
1268
|
def f(x: typing.Annotated[int, "blah"]):
|
@@ -1,13 +1,23 @@
|
|
1
1
|
# from typing import TYPE_CHECKING
|
2
|
-
|
2
|
+
from ovld import ovld
|
3
|
+
from ovld.core import OvldMC
|
4
|
+
|
3
5
|
# from plum import dispatch as ovld
|
4
6
|
# from multimethod import multimethod as ovld
|
5
|
-
from runtype import multidispatch as ovld
|
7
|
+
# from runtype import multidispatch as ovld
|
6
8
|
|
7
9
|
# # if TYPE_CHECKING:
|
8
10
|
# from typing import overload
|
9
11
|
|
10
12
|
|
13
|
+
class O(metaclass=OvldMC):
|
14
|
+
def f(self, x: int):
|
15
|
+
pass
|
16
|
+
|
17
|
+
def f(self, x: str):
|
18
|
+
pass
|
19
|
+
|
20
|
+
|
11
21
|
@ovld
|
12
22
|
def f(x: int) -> int:
|
13
23
|
"A"
|
@@ -23,3 +33,4 @@ def f(x: str) -> int:
|
|
23
33
|
f
|
24
34
|
print(f(8))
|
25
35
|
print(f("8"))
|
36
|
+
print(f([]))
|
ovld-0.4.5/.python-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.12.4
|
ovld-0.4.5/src/ovld/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
version = "0.4.5"
|
File without changes
|
File without changes
|
{ovld-0.4.5 → ovld-0.4.6}/.envrc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ovld-0.4.5 → ovld-0.4.6}/add.py
RENAMED
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
|
{ovld-0.4.5 → ovld-0.4.6}/doo.py
RENAMED
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
|
{ovld-0.4.5 → ovld-0.4.6}/nxt.py
RENAMED
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
|
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
|
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
|
{ovld-0.4.5 → ovld-0.4.6}/tb.py
RENAMED
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
|
{ovld-0.4.5 → ovld-0.4.6}/todo.q
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ovld-0.4.5 → ovld-0.4.6}/x.py
RENAMED
File without changes
|
{ovld-0.4.5 → ovld-0.4.6}/zaggo
RENAMED
File without changes
|