scaevola 1.0.9__py3-none-any.whl → 1.0.11__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.
- scaevola/__init__.py +2 -64
- scaevola/core.py +69 -0
- scaevola/tests/__init__.py +11 -0
- scaevola/tests/tests_operators.py +1 -7
- {scaevola-1.0.9.dist-info → scaevola-1.0.11.dist-info}/METADATA +7 -46
- scaevola-1.0.11.dist-info/RECORD +9 -0
- {scaevola-1.0.9.dist-info → scaevola-1.0.11.dist-info}/WHEEL +1 -1
- scaevola-1.0.9.dist-info/RECORD +0 -8
- {scaevola-1.0.9.dist-info → scaevola-1.0.11.dist-info}/LICENSE.txt +0 -0
- {scaevola-1.0.9.dist-info → scaevola-1.0.11.dist-info}/top_level.txt +0 -0
scaevola/__init__.py
CHANGED
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"""Return other<=self."""
|
|
4
|
-
return type(self)(other) <= self
|
|
5
|
-
|
|
6
|
-
def __gt__(self, other, /):
|
|
7
|
-
"""Return other<self."""
|
|
8
|
-
return type(self)(other) < self
|
|
9
|
-
|
|
10
|
-
def __radd__(self, other, /):
|
|
11
|
-
"""Return other+self."""
|
|
12
|
-
return type(self)(other) + self
|
|
13
|
-
|
|
14
|
-
def __rand__(self, other, /):
|
|
15
|
-
"""Return other&self."""
|
|
16
|
-
return type(self)(other) & self
|
|
17
|
-
|
|
18
|
-
def __rdivmod__(self, other, /):
|
|
19
|
-
"""Return divmod(other, self)."""
|
|
20
|
-
return divmod(type(self)(other), self)
|
|
21
|
-
|
|
22
|
-
def __rfloordiv__(self, other, /):
|
|
23
|
-
"""Return other//self."""
|
|
24
|
-
return type(self)(other) // self
|
|
25
|
-
|
|
26
|
-
def __rlshift__(self, other, /):
|
|
27
|
-
"""Return other<<self."""
|
|
28
|
-
return type(self)(other) << self
|
|
29
|
-
|
|
30
|
-
def __rmatmul__(self, other, /):
|
|
31
|
-
"""Return other@self."""
|
|
32
|
-
return type(self)(other) @ self
|
|
33
|
-
|
|
34
|
-
def __rmod__(self, other, /):
|
|
35
|
-
"""Return other%self."""
|
|
36
|
-
return type(self)(other) % self
|
|
37
|
-
|
|
38
|
-
def __rmul__(self, other, /):
|
|
39
|
-
"""Return other*self."""
|
|
40
|
-
return type(self)(other) * self
|
|
41
|
-
|
|
42
|
-
def __ror__(self, other, /):
|
|
43
|
-
"""Return other|self."""
|
|
44
|
-
return type(self)(other) | self
|
|
45
|
-
|
|
46
|
-
def __rpow__(self, other, /):
|
|
47
|
-
"""Return other**self."""
|
|
48
|
-
return type(self)(other) ** self
|
|
49
|
-
|
|
50
|
-
def __rrshift__(self, other, /):
|
|
51
|
-
"""Return other>>self."""
|
|
52
|
-
return type(self)(other) >> self
|
|
53
|
-
|
|
54
|
-
def __rsub__(self, other, /):
|
|
55
|
-
"""Return other-self."""
|
|
56
|
-
return type(self)(other) - self
|
|
57
|
-
|
|
58
|
-
def __rtruediv__(self, other, /):
|
|
59
|
-
"""Return other/self."""
|
|
60
|
-
return type(self)(other) / self
|
|
61
|
-
|
|
62
|
-
def __rxor__(self, other, /):
|
|
63
|
-
"""Return other^self."""
|
|
64
|
-
return type(self)(other) ^ self
|
|
1
|
+
from scaevola.core import *
|
|
2
|
+
from scaevola.tests import *
|
scaevola/core.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from typing import *
|
|
2
|
+
|
|
3
|
+
__all__ = ["Scaevola"]
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Scaevola:
|
|
7
|
+
def __ge__(self, other: Any) -> Any:
|
|
8
|
+
"""Return self>=other."""
|
|
9
|
+
return type(self)(other) <= self
|
|
10
|
+
|
|
11
|
+
def __gt__(self, other: Any) -> Any:
|
|
12
|
+
"""Return self>other."""
|
|
13
|
+
return type(self)(other) < self
|
|
14
|
+
|
|
15
|
+
def __radd__(self, other: Any) -> Any:
|
|
16
|
+
"""Return other+self."""
|
|
17
|
+
return type(self)(other) + self
|
|
18
|
+
|
|
19
|
+
def __rand__(self, other: Any) -> Any:
|
|
20
|
+
"""Return other&self."""
|
|
21
|
+
return type(self)(other) & self
|
|
22
|
+
|
|
23
|
+
def __rdivmod__(self, other: Any) -> Any:
|
|
24
|
+
"""Return divmod(other, self)."""
|
|
25
|
+
return divmod(type(self)(other), self)
|
|
26
|
+
|
|
27
|
+
def __rfloordiv__(self, other: Any) -> Any:
|
|
28
|
+
"""Return other//self."""
|
|
29
|
+
return type(self)(other) // self
|
|
30
|
+
|
|
31
|
+
def __rlshift__(self, other: Any) -> Any:
|
|
32
|
+
"""Return other<<self."""
|
|
33
|
+
return type(self)(other) << self
|
|
34
|
+
|
|
35
|
+
def __rmatmul__(self, other: Any) -> Any:
|
|
36
|
+
"""Return other@self."""
|
|
37
|
+
return type(self)(other) @ self
|
|
38
|
+
|
|
39
|
+
def __rmod__(self, other: Any) -> Any:
|
|
40
|
+
"""Return other%self."""
|
|
41
|
+
return type(self)(other) % self
|
|
42
|
+
|
|
43
|
+
def __rmul__(self, other: Any) -> Any:
|
|
44
|
+
"""Return other*self."""
|
|
45
|
+
return type(self)(other) * self
|
|
46
|
+
|
|
47
|
+
def __ror__(self, other: Any) -> Any:
|
|
48
|
+
"""Return other|self."""
|
|
49
|
+
return type(self)(other) | self
|
|
50
|
+
|
|
51
|
+
def __rpow__(self, other: Any) -> Any:
|
|
52
|
+
"""Return pow(other, self)."""
|
|
53
|
+
return type(self)(other) ** self
|
|
54
|
+
|
|
55
|
+
def __rrshift__(self, other: Any) -> Any:
|
|
56
|
+
"""Return other>>self."""
|
|
57
|
+
return type(self)(other) >> self
|
|
58
|
+
|
|
59
|
+
def __rsub__(self, other: Any) -> Any:
|
|
60
|
+
"""Return other-self."""
|
|
61
|
+
return type(self)(other) - self
|
|
62
|
+
|
|
63
|
+
def __rtruediv__(self, other: Any) -> Any:
|
|
64
|
+
"""Return other/self."""
|
|
65
|
+
return type(self)(other) / self
|
|
66
|
+
|
|
67
|
+
def __rxor__(self, other: Any) -> Any:
|
|
68
|
+
"""Return other^self."""
|
|
69
|
+
return type(self)(other) ^ self
|
scaevola/tests/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import unittest
|
|
2
2
|
|
|
3
|
-
from scaevola import Scaevola
|
|
3
|
+
from scaevola.core import Scaevola
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# Subclass of Scaevola to implement basic arithmetic and comparison operations
|
|
@@ -148,12 +148,6 @@ class TestScaevola(unittest.TestCase):
|
|
|
148
148
|
def test_rpow(self):
|
|
149
149
|
result = 2**self.obj1
|
|
150
150
|
self.assertEqual(result.value, 2**10)
|
|
151
|
-
result = pow(2, self.obj1)
|
|
152
|
-
self.assertEqual(result.value, 2**10)
|
|
153
|
-
result = pow(2, exp=self.obj1)
|
|
154
|
-
self.assertEqual(result.value, 2**10)
|
|
155
|
-
result = pow(base=2, exp=self.obj1)
|
|
156
|
-
self.assertEqual(result.value, 2**10)
|
|
157
151
|
|
|
158
152
|
def test_rrshift(self):
|
|
159
153
|
result = 1024 >> self.obj1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: scaevola
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: class with preset right handed magic methods
|
|
5
5
|
Author-email: Johannes <johannes-programming@mailfence.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -26,7 +26,9 @@ License: The MIT License (MIT)
|
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
Project-URL: Documentation, https://pypi.org/project/scaevola
|
|
28
28
|
Project-URL: Download, https://pypi.org/project/scaevola/#files
|
|
29
|
-
Project-URL:
|
|
29
|
+
Project-URL: Index, https://pypi.org/project/scaevola/
|
|
30
|
+
Project-URL: Source, https://github.com/johannes-programming/scaevola
|
|
31
|
+
Project-URL: Website, https://scaevola.johannes-programming.online/
|
|
30
32
|
Classifier: Development Status :: 5 - Production/Stable
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
34
|
Classifier: Programming Language :: Python
|
|
@@ -40,47 +42,6 @@ License-File: LICENSE.txt
|
|
|
40
42
|
scaevola
|
|
41
43
|
========
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
This project contains the ``Scaevola`` class which can be used as a baseclass to utilize its preset righthanded magic methods: ``__ge__``, ``__gt__``, ``__radd__``, ``__rand__``, ``__rdivmod__``, ``__rfloordiv__``, ``__rlshift__``, ``__rmatmul__``, ``__rmod__``, ``__rmul__``, ``__ror__``, ``__rpow__``, ``__rrshift__``, ``__rsub__``, ``__rtruediv__``, ``__rxor__``
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Example
|
|
50
|
-
-------
|
|
51
|
-
|
|
52
|
-
The __radd__ magic method is defined as below. The others follow the same pattern.
|
|
53
|
-
|
|
54
|
-
.. code-block:: python
|
|
55
|
-
|
|
56
|
-
def __radd__(self, other):
|
|
57
|
-
return type(self)(other) + self
|
|
58
|
-
|
|
59
|
-
Installation
|
|
60
|
-
------------
|
|
61
|
-
|
|
62
|
-
To install ``scaevola``, you can use ``pip``. Open your terminal and run:
|
|
63
|
-
|
|
64
|
-
.. code-block:: bash
|
|
65
|
-
|
|
66
|
-
pip install scaevola
|
|
67
|
-
|
|
68
|
-
License
|
|
69
|
-
-------
|
|
70
|
-
|
|
71
|
-
This project is licensed under the MIT License.
|
|
72
|
-
|
|
73
|
-
Links
|
|
74
|
-
-----
|
|
75
|
-
|
|
76
|
-
* `Documentation <https://pypi.org/project/scaevola/>`_
|
|
77
|
-
* `Download <https://pypi.org/project/scaevola/#files>`_
|
|
78
|
-
* `Source <https://github.com/johannes-programming/scaevola>`_
|
|
79
|
-
|
|
80
|
-
Credits
|
|
81
|
-
-------
|
|
82
|
-
|
|
83
|
-
- Author: Johannes
|
|
84
|
-
- Email: `johannes-programming@mailfence.com <mailto:johannes-programming@mailfence.com>`_
|
|
85
|
-
|
|
86
|
-
Thank you for using ``scaevola``!
|
|
45
|
+
Pad nucleotide sequence.
|
|
46
|
+
Visit the website for more information:
|
|
47
|
+
`https://scaevola.johannes-programming.online <https://scaevola.johannes-programming.online>`_
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
scaevola/__init__.py,sha256=KAt5tVgdikLvbdauzJTkCsxH3vJKrff4LB1CH8OklYM,57
|
|
2
|
+
scaevola/core.py,sha256=8BrwNl4jyc5kRY9yUbK1xE8R_HI2ytET_b3Ve_T_Xng,1981
|
|
3
|
+
scaevola/tests/__init__.py,sha256=ks4pt_cFlcE6dNvV8osJ7Ezzewqqqm4LPnP9Qod20tM,229
|
|
4
|
+
scaevola/tests/tests_operators.py,sha256=OfXTuqdPouiZontb-aVZ5r33uTYijibkpO0Kmf4veKU,5115
|
|
5
|
+
scaevola-1.0.11.dist-info/LICENSE.txt,sha256=QwqYepQwTN5xG57cngKt6xxYD9z9hw9d3lcI8zSLiNg,1074
|
|
6
|
+
scaevola-1.0.11.dist-info/METADATA,sha256=hSESzq-CcddVobyBSXkyESyALNIUEXui6hiCW-2Dvr0,2259
|
|
7
|
+
scaevola-1.0.11.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
8
|
+
scaevola-1.0.11.dist-info/top_level.txt,sha256=1oM62lKpwPWVxHtGCB2tN-TIs0bzZaSkB9dlI3Eoesw,9
|
|
9
|
+
scaevola-1.0.11.dist-info/RECORD,,
|
scaevola-1.0.9.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
scaevola/__init__.py,sha256=xHHrgu2zsrqDroxuL7SNF9C8yWnRYPBj4c_EHcIz6Ig,1785
|
|
2
|
-
scaevola/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
scaevola/tests/tests_operators.py,sha256=aKtkbeShdCZVyWONQLMBnbuLiT_qXqZMl3wVOz4VWcE,5366
|
|
4
|
-
scaevola-1.0.9.dist-info/LICENSE.txt,sha256=QwqYepQwTN5xG57cngKt6xxYD9z9hw9d3lcI8zSLiNg,1074
|
|
5
|
-
scaevola-1.0.9.dist-info/METADATA,sha256=yfmFr_-27WupHd6X4PtUPGNYmqTJXKuYKX6BuQCRwfw,3124
|
|
6
|
-
scaevola-1.0.9.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
7
|
-
scaevola-1.0.9.dist-info/top_level.txt,sha256=1oM62lKpwPWVxHtGCB2tN-TIs0bzZaSkB9dlI3Eoesw,9
|
|
8
|
-
scaevola-1.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|