scaevola 1.0.9__tar.gz → 1.0.11__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.0.9/src/scaevola.egg-info → scaevola-1.0.11}/PKG-INFO +7 -46
- scaevola-1.0.11/README.rst +7 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/pyproject.toml +4 -2
- scaevola-1.0.11/src/scaevola/__init__.py +2 -0
- scaevola-1.0.9/src/scaevola/__init__.py → scaevola-1.0.11/src/scaevola/core.py +24 -19
- scaevola-1.0.11/src/scaevola/tests/__init__.py +11 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/src/scaevola/tests/tests_operators.py +1 -7
- {scaevola-1.0.9 → scaevola-1.0.11/src/scaevola.egg-info}/PKG-INFO +7 -46
- {scaevola-1.0.9 → scaevola-1.0.11}/src/scaevola.egg-info/SOURCES.txt +1 -0
- scaevola-1.0.9/README.rst +0 -48
- scaevola-1.0.9/src/scaevola/tests/__init__.py +0 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/LICENSE.txt +0 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/MANIFEST.in +0 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/setup.cfg +0 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/src/scaevola.egg-info/dependency_links.txt +0 -0
- {scaevola-1.0.9 → scaevola-1.0.11}/src/scaevola.egg-info/top_level.txt +0 -0
|
@@ -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>`_
|
|
@@ -21,7 +21,7 @@ keywords = []
|
|
|
21
21
|
name = "scaevola"
|
|
22
22
|
readme = "README.rst"
|
|
23
23
|
requires-python = ">=3.8"
|
|
24
|
-
version = "1.0.
|
|
24
|
+
version = "1.0.11"
|
|
25
25
|
|
|
26
26
|
[project.license]
|
|
27
27
|
file = "LICENSE.txt"
|
|
@@ -29,4 +29,6 @@ file = "LICENSE.txt"
|
|
|
29
29
|
[project.urls]
|
|
30
30
|
Documentation = "https://pypi.org/project/scaevola"
|
|
31
31
|
Download = "https://pypi.org/project/scaevola/#files"
|
|
32
|
-
|
|
32
|
+
Index = "https://pypi.org/project/scaevola/"
|
|
33
|
+
Source = "https://github.com/johannes-programming/scaevola"
|
|
34
|
+
Website = "https://scaevola.johannes-programming.online/"
|
|
@@ -1,64 +1,69 @@
|
|
|
1
|
+
from typing import *
|
|
2
|
+
|
|
3
|
+
__all__ = ["Scaevola"]
|
|
4
|
+
|
|
5
|
+
|
|
1
6
|
class Scaevola:
|
|
2
|
-
def __ge__(self, other
|
|
3
|
-
"""Return other
|
|
7
|
+
def __ge__(self, other: Any) -> Any:
|
|
8
|
+
"""Return self>=other."""
|
|
4
9
|
return type(self)(other) <= self
|
|
5
10
|
|
|
6
|
-
def __gt__(self, other
|
|
7
|
-
"""Return other
|
|
11
|
+
def __gt__(self, other: Any) -> Any:
|
|
12
|
+
"""Return self>other."""
|
|
8
13
|
return type(self)(other) < self
|
|
9
14
|
|
|
10
|
-
def __radd__(self, other
|
|
15
|
+
def __radd__(self, other: Any) -> Any:
|
|
11
16
|
"""Return other+self."""
|
|
12
17
|
return type(self)(other) + self
|
|
13
18
|
|
|
14
|
-
def __rand__(self, other
|
|
19
|
+
def __rand__(self, other: Any) -> Any:
|
|
15
20
|
"""Return other&self."""
|
|
16
21
|
return type(self)(other) & self
|
|
17
22
|
|
|
18
|
-
def __rdivmod__(self, other
|
|
23
|
+
def __rdivmod__(self, other: Any) -> Any:
|
|
19
24
|
"""Return divmod(other, self)."""
|
|
20
25
|
return divmod(type(self)(other), self)
|
|
21
26
|
|
|
22
|
-
def __rfloordiv__(self, other
|
|
27
|
+
def __rfloordiv__(self, other: Any) -> Any:
|
|
23
28
|
"""Return other//self."""
|
|
24
29
|
return type(self)(other) // self
|
|
25
30
|
|
|
26
|
-
def __rlshift__(self, other
|
|
31
|
+
def __rlshift__(self, other: Any) -> Any:
|
|
27
32
|
"""Return other<<self."""
|
|
28
33
|
return type(self)(other) << self
|
|
29
34
|
|
|
30
|
-
def __rmatmul__(self, other
|
|
35
|
+
def __rmatmul__(self, other: Any) -> Any:
|
|
31
36
|
"""Return other@self."""
|
|
32
37
|
return type(self)(other) @ self
|
|
33
38
|
|
|
34
|
-
def __rmod__(self, other
|
|
39
|
+
def __rmod__(self, other: Any) -> Any:
|
|
35
40
|
"""Return other%self."""
|
|
36
41
|
return type(self)(other) % self
|
|
37
42
|
|
|
38
|
-
def __rmul__(self, other
|
|
43
|
+
def __rmul__(self, other: Any) -> Any:
|
|
39
44
|
"""Return other*self."""
|
|
40
45
|
return type(self)(other) * self
|
|
41
46
|
|
|
42
|
-
def __ror__(self, other
|
|
47
|
+
def __ror__(self, other: Any) -> Any:
|
|
43
48
|
"""Return other|self."""
|
|
44
49
|
return type(self)(other) | self
|
|
45
50
|
|
|
46
|
-
def __rpow__(self, other
|
|
47
|
-
"""Return other
|
|
51
|
+
def __rpow__(self, other: Any) -> Any:
|
|
52
|
+
"""Return pow(other, self)."""
|
|
48
53
|
return type(self)(other) ** self
|
|
49
54
|
|
|
50
|
-
def __rrshift__(self, other
|
|
55
|
+
def __rrshift__(self, other: Any) -> Any:
|
|
51
56
|
"""Return other>>self."""
|
|
52
57
|
return type(self)(other) >> self
|
|
53
58
|
|
|
54
|
-
def __rsub__(self, other
|
|
59
|
+
def __rsub__(self, other: Any) -> Any:
|
|
55
60
|
"""Return other-self."""
|
|
56
61
|
return type(self)(other) - self
|
|
57
62
|
|
|
58
|
-
def __rtruediv__(self, other
|
|
63
|
+
def __rtruediv__(self, other: Any) -> Any:
|
|
59
64
|
"""Return other/self."""
|
|
60
65
|
return type(self)(other) / self
|
|
61
66
|
|
|
62
|
-
def __rxor__(self, other
|
|
67
|
+
def __rxor__(self, other: Any) -> Any:
|
|
63
68
|
"""Return other^self."""
|
|
64
69
|
return type(self)(other) ^ self
|
|
@@ -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>`_
|
scaevola-1.0.9/README.rst
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
========
|
|
2
|
-
scaevola
|
|
3
|
-
========
|
|
4
|
-
|
|
5
|
-
Overview
|
|
6
|
-
--------
|
|
7
|
-
|
|
8
|
-
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__``
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Example
|
|
12
|
-
-------
|
|
13
|
-
|
|
14
|
-
The __radd__ magic method is defined as below. The others follow the same pattern.
|
|
15
|
-
|
|
16
|
-
.. code-block:: python
|
|
17
|
-
|
|
18
|
-
def __radd__(self, other):
|
|
19
|
-
return type(self)(other) + self
|
|
20
|
-
|
|
21
|
-
Installation
|
|
22
|
-
------------
|
|
23
|
-
|
|
24
|
-
To install ``scaevola``, you can use ``pip``. Open your terminal and run:
|
|
25
|
-
|
|
26
|
-
.. code-block:: bash
|
|
27
|
-
|
|
28
|
-
pip install scaevola
|
|
29
|
-
|
|
30
|
-
License
|
|
31
|
-
-------
|
|
32
|
-
|
|
33
|
-
This project is licensed under the MIT License.
|
|
34
|
-
|
|
35
|
-
Links
|
|
36
|
-
-----
|
|
37
|
-
|
|
38
|
-
* `Documentation <https://pypi.org/project/scaevola/>`_
|
|
39
|
-
* `Download <https://pypi.org/project/scaevola/#files>`_
|
|
40
|
-
* `Source <https://github.com/johannes-programming/scaevola>`_
|
|
41
|
-
|
|
42
|
-
Credits
|
|
43
|
-
-------
|
|
44
|
-
|
|
45
|
-
- Author: Johannes
|
|
46
|
-
- Email: `johannes-programming@mailfence.com <mailto:johannes-programming@mailfence.com>`_
|
|
47
|
-
|
|
48
|
-
Thank you for using ``scaevola``!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|