StructResult 0.3.0__tar.gz → 0.3.1__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
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: StructResult
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: structural result with exception
5
5
  Author-email: Serj Kotilevski <youserj@outlook.com>
6
6
  Project-URL: Source, https://github.com/youserj/Result_prj
@@ -9,7 +9,7 @@ where = ["src"]
9
9
 
10
10
  [project]
11
11
  name = "StructResult"
12
- version = "0.3.0"
12
+ version = "0.3.1"
13
13
  requires-python = ">= 3.12"
14
14
  authors = [
15
15
  {name="Serj Kotilevski", email="youserj@outlook.com"}
@@ -1,10 +1,10 @@
1
- from typing import Optional, TypeVar, Generic
1
+ from typing import Optional, TypeVar, Generic, Self
2
2
 
3
3
  T = TypeVar("T")
4
4
 
5
5
 
6
6
  class Result(Generic[T]):
7
- value: T
7
+ value: Optional[T]
8
8
  err: Optional[list[Exception]]
9
9
  __slots__ = ("value", "err")
10
10
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: StructResult
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: structural result with exception
5
5
  Author-email: Serj Kotilevski <youserj@outlook.com>
6
6
  Project-URL: Source, https://github.com/youserj/Result_prj
@@ -7,5 +7,4 @@ class TestType(unittest.TestCase):
7
7
  def test_init(self):
8
8
  res = Result[int](1)
9
9
  self.assertEqual(res.value, 1)
10
- self.assertEqual(list(res), [1, None])
11
-
10
+ self.assertEqual(list(res), [1, None])
File without changes
File without changes