cmp3 0.1.0.dev0__tar.gz → 0.1.0.dev2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmp3
3
- Version: 0.1.0.dev0
3
+ Version: 0.1.0.dev2
4
4
  Summary: This project updates the concept of __cmp__ for python3.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -26,7 +26,7 @@ keywords = []
26
26
  name = "cmp3"
27
27
  readme = "README.rst"
28
28
  requires-python = ">=3.11"
29
- version = "0.1.0.dev0"
29
+ version = "0.1.0.dev2"
30
30
 
31
31
  [project.license]
32
32
  file = "LICENSE.txt"
@@ -1,3 +1,4 @@
1
+ from abc import ABC, abstractmethod
1
2
  from functools import partial
2
3
  from typing import *
3
4
 
@@ -52,5 +53,8 @@ def update(cls: type, /, *, overwrite: Any = False) -> type:
52
53
 
53
54
 
54
55
  @comparable()
55
- class Comparable:
56
+ class Comparable(ABC):
56
57
  __slots__ = ()
58
+
59
+ @abstractmethod
60
+ def __cmp__(self: Self, other: Any) -> Any: ...
@@ -0,0 +1,16 @@
1
+ import unittest
2
+
3
+ __all__ = ["test"]
4
+
5
+
6
+ def test() -> unittest.TextTestRunner:
7
+ "This function runs all the tests."
8
+ loader: unittest.TestLoader
9
+ suite: unittest.TestSuite
10
+ runner: unittest.TextTestRunner
11
+ result: unittest.TextTestResult
12
+ loader = unittest.TestLoader()
13
+ suite = loader.discover(start_dir="cmp3.tests")
14
+ runner = unittest.TextTestRunner()
15
+ result = runner.run(suite)
16
+ return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmp3
3
- Version: 0.1.0.dev0
3
+ Version: 0.1.0.dev2
4
4
  Summary: This project updates the concept of __cmp__ for python3.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -1,12 +0,0 @@
1
- import unittest
2
-
3
- __all__ = ["test"]
4
-
5
-
6
- def test() -> unittest.TextTestRunner:
7
- "This function runs all the tests."
8
- loader: unittest.TestLoader = unittest.TestLoader()
9
- tests: unittest.TestSuite = loader.discover(start_dir="cmp3.tests")
10
- runner: unittest.TextTestRunner = unittest.TextTestRunner()
11
- result: unittest.TextTestResult = runner.run(tests)
12
- return result
File without changes
File without changes
File without changes
File without changes