scaevola 1.1.2__tar.gz → 1.1.3__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.
- {scaevola-1.1.2/src/scaevola.egg-info → scaevola-1.1.3}/PKG-INFO +2 -1
- {scaevola-1.1.2 → scaevola-1.1.3}/pyproject.toml +5 -3
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/core/__init__.py +11 -6
- scaevola-1.1.3/src/scaevola/core/cfg.toml +48 -0
- {scaevola-1.1.2 → scaevola-1.1.3/src/scaevola.egg-info}/PKG-INFO +2 -1
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola.egg-info/SOURCES.txt +1 -0
- scaevola-1.1.3/src/scaevola.egg-info/requires.txt +1 -0
- scaevola-1.1.2/src/scaevola/core/cfg.toml +0 -64
- {scaevola-1.1.2 → scaevola-1.1.3}/LICENSE.txt +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/MANIFEST.in +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/README.rst +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/setup.cfg +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/__init__.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/tests/__init__.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/tests/test_doc.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/tests/test_op.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/tests/test_slots_Scaevola.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola/tests/test_slots_auto.py +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola.egg-info/dependency_links.txt +0 -0
- {scaevola-1.1.2 → scaevola-1.1.3}/src/scaevola.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scaevola
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: This project provides a class with preset right handed magic methods.
|
|
5
5
|
Author-email: Johannes <johannes.programming@gmail.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -39,6 +39,7 @@ Classifier: Typing :: Typed
|
|
|
39
39
|
Requires-Python: >=3.11
|
|
40
40
|
Description-Content-Type: text/x-rst
|
|
41
41
|
License-File: LICENSE.txt
|
|
42
|
+
Requires-Dist: setdoc<2,>=1.2.8
|
|
42
43
|
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
========
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
build-backend = "setuptools.build_meta"
|
|
3
3
|
requires = [
|
|
4
|
-
"setuptools>=
|
|
4
|
+
"setuptools>=64.0",
|
|
5
5
|
]
|
|
6
6
|
|
|
7
7
|
[project]
|
|
@@ -18,13 +18,15 @@ classifiers = [
|
|
|
18
18
|
"Programming Language :: Python :: 3 :: Only",
|
|
19
19
|
"Typing :: Typed",
|
|
20
20
|
]
|
|
21
|
-
dependencies = [
|
|
21
|
+
dependencies = [
|
|
22
|
+
"setdoc>=1.2.8,<2",
|
|
23
|
+
]
|
|
22
24
|
description = "This project provides a class with preset right handed magic methods."
|
|
23
25
|
keywords = []
|
|
24
26
|
name = "scaevola"
|
|
25
27
|
readme = "README.rst"
|
|
26
28
|
requires-python = ">=3.11"
|
|
27
|
-
version = "1.1.
|
|
29
|
+
version = "1.1.3"
|
|
28
30
|
|
|
29
31
|
[project.license]
|
|
30
32
|
file = "LICENSE.txt"
|
|
@@ -7,19 +7,22 @@ import types
|
|
|
7
7
|
from importlib import resources
|
|
8
8
|
from typing import *
|
|
9
9
|
|
|
10
|
+
import setdoc
|
|
11
|
+
|
|
10
12
|
__all__ = ["Scaevola", "auto", "getfuncnames", "makefunc"]
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class Util(enum.Enum):
|
|
14
16
|
"This enum provides a singleton."
|
|
17
|
+
|
|
15
18
|
util = None
|
|
16
19
|
|
|
17
20
|
@functools.cached_property
|
|
18
21
|
def data(self: Self) -> dict:
|
|
19
22
|
"This cached property holds the cfg data."
|
|
20
|
-
text: str
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
+
text: str
|
|
24
|
+
text = resources.read_text("scaevola.core", "cfg.toml")
|
|
25
|
+
return tomllib.loads(text)
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
def auto(cls: type) -> type:
|
|
@@ -38,22 +41,24 @@ def getfuncnames() -> list[str]:
|
|
|
38
41
|
|
|
39
42
|
def makefunc(cls: type, name: str) -> types.FunctionType:
|
|
40
43
|
"This function implements a certain righthand function."
|
|
41
|
-
funcname: str
|
|
44
|
+
funcname: str
|
|
45
|
+
inner: Callable
|
|
42
46
|
module: Any
|
|
47
|
+
funcname = Util.util.data[name]["func"]
|
|
43
48
|
if Util.util.data[name].get("isbuiltin", False):
|
|
44
49
|
module = builtins
|
|
45
50
|
else:
|
|
46
51
|
module = operator
|
|
47
|
-
inner
|
|
52
|
+
inner = getattr(module, funcname)
|
|
48
53
|
|
|
49
54
|
def outer(self: Self, other: Any) -> Any:
|
|
50
55
|
"This docstring will be overwritten."
|
|
51
56
|
return inner(type(self)(other), self)
|
|
52
57
|
|
|
53
|
-
outer.__doc__ = Util.util.data[name]["doc"]
|
|
54
58
|
outer.__module__ = cls.__module__
|
|
55
59
|
outer.__name__ = name
|
|
56
60
|
outer.__qualname__ = cls.__qualname__ + "." + name
|
|
61
|
+
setdoc.basic(outer)
|
|
57
62
|
setattr(cls, name, outer)
|
|
58
63
|
return outer
|
|
59
64
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[__ge__]
|
|
2
|
+
func = "le"
|
|
3
|
+
|
|
4
|
+
[__gt__]
|
|
5
|
+
func = "lt"
|
|
6
|
+
|
|
7
|
+
[__radd__]
|
|
8
|
+
func = "add"
|
|
9
|
+
|
|
10
|
+
[__rand__]
|
|
11
|
+
func = "and_"
|
|
12
|
+
|
|
13
|
+
[__rdivmod__]
|
|
14
|
+
func = "divmod"
|
|
15
|
+
isbuiltin = true
|
|
16
|
+
|
|
17
|
+
[__rfloordiv__]
|
|
18
|
+
func = "floordiv"
|
|
19
|
+
|
|
20
|
+
[__rlshift__]
|
|
21
|
+
func = "lshift"
|
|
22
|
+
|
|
23
|
+
[__rmatmul__]
|
|
24
|
+
func = "matmul"
|
|
25
|
+
|
|
26
|
+
[__rmod__]
|
|
27
|
+
func = "mod"
|
|
28
|
+
|
|
29
|
+
[__rmul__]
|
|
30
|
+
func = "mul"
|
|
31
|
+
|
|
32
|
+
[__ror__]
|
|
33
|
+
func = "or_"
|
|
34
|
+
|
|
35
|
+
[__rpow__]
|
|
36
|
+
func = "pow"
|
|
37
|
+
|
|
38
|
+
[__rrshift__]
|
|
39
|
+
func = "rshift"
|
|
40
|
+
|
|
41
|
+
[__rsub__]
|
|
42
|
+
func = "sub"
|
|
43
|
+
|
|
44
|
+
[__rtruediv__]
|
|
45
|
+
func = "truediv"
|
|
46
|
+
|
|
47
|
+
[__rxor__]
|
|
48
|
+
func = "xor"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scaevola
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: This project provides a class with preset right handed magic methods.
|
|
5
5
|
Author-email: Johannes <johannes.programming@gmail.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -39,6 +39,7 @@ Classifier: Typing :: Typed
|
|
|
39
39
|
Requires-Python: >=3.11
|
|
40
40
|
Description-Content-Type: text/x-rst
|
|
41
41
|
License-File: LICENSE.txt
|
|
42
|
+
Requires-Dist: setdoc<2,>=1.2.8
|
|
42
43
|
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
========
|
|
@@ -7,6 +7,7 @@ src/scaevola/__init__.py
|
|
|
7
7
|
src/scaevola.egg-info/PKG-INFO
|
|
8
8
|
src/scaevola.egg-info/SOURCES.txt
|
|
9
9
|
src/scaevola.egg-info/dependency_links.txt
|
|
10
|
+
src/scaevola.egg-info/requires.txt
|
|
10
11
|
src/scaevola.egg-info/top_level.txt
|
|
11
12
|
src/scaevola/core/__init__.py
|
|
12
13
|
src/scaevola/core/cfg.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
setdoc<2,>=1.2.8
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[__ge__]
|
|
2
|
-
doc = "This magic method implements self>=other."
|
|
3
|
-
func = "le"
|
|
4
|
-
|
|
5
|
-
[__gt__]
|
|
6
|
-
doc = "This magic method implements self>other."
|
|
7
|
-
func = "lt"
|
|
8
|
-
|
|
9
|
-
[__radd__]
|
|
10
|
-
doc = "This magic method implements other+self."
|
|
11
|
-
func = "add"
|
|
12
|
-
|
|
13
|
-
[__rand__]
|
|
14
|
-
doc = "This magic method implements other&self."
|
|
15
|
-
func = "and_"
|
|
16
|
-
|
|
17
|
-
[__rdivmod__]
|
|
18
|
-
doc = "This magic method implements divmod(other, self)."
|
|
19
|
-
func = "divmod"
|
|
20
|
-
isbuiltin = true
|
|
21
|
-
|
|
22
|
-
[__rfloordiv__]
|
|
23
|
-
doc = "This magic method implements other//self."
|
|
24
|
-
func = "floordiv"
|
|
25
|
-
|
|
26
|
-
[__rlshift__]
|
|
27
|
-
doc = "This magic method implements other<<self."
|
|
28
|
-
func = "lshift"
|
|
29
|
-
|
|
30
|
-
[__rmatmul__]
|
|
31
|
-
doc = "This magic method implements other@self."
|
|
32
|
-
func = "matmul"
|
|
33
|
-
|
|
34
|
-
[__rmod__]
|
|
35
|
-
doc = "This magic method implements other%self."
|
|
36
|
-
func = "mod"
|
|
37
|
-
|
|
38
|
-
[__rmul__]
|
|
39
|
-
doc = "This magic method implements other*self."
|
|
40
|
-
func = "mul"
|
|
41
|
-
|
|
42
|
-
[__ror__]
|
|
43
|
-
doc = "This magic method implements other|self."
|
|
44
|
-
func = "or_"
|
|
45
|
-
|
|
46
|
-
[__rpow__]
|
|
47
|
-
doc = "This magic method implements other**self."
|
|
48
|
-
func = "pow"
|
|
49
|
-
|
|
50
|
-
[__rrshift__]
|
|
51
|
-
doc = "This magic method implements other>>self."
|
|
52
|
-
func = "rshift"
|
|
53
|
-
|
|
54
|
-
[__rsub__]
|
|
55
|
-
doc = "This magic method implements other-self."
|
|
56
|
-
func = "sub"
|
|
57
|
-
|
|
58
|
-
[__rtruediv__]
|
|
59
|
-
doc = "This magic method implements other/self."
|
|
60
|
-
func = "truediv"
|
|
61
|
-
|
|
62
|
-
[__rxor__]
|
|
63
|
-
doc = "This magic method implements other^self."
|
|
64
|
-
func = "xor"
|
|
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
|