setdoc 1.2.7__tar.gz → 1.2.9__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: setdoc
3
- Version: 1.2.7
3
+ Version: 1.2.9
4
4
  Summary: This project helps to set the doc string.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -24,7 +24,7 @@ keywords = []
24
24
  name = "setdoc"
25
25
  readme = "README.rst"
26
26
  requires-python = ">=3.11"
27
- version = "1.2.7"
27
+ version = "1.2.9"
28
28
 
29
29
  [project.license]
30
30
  file = "LICENSE.txt"
@@ -5,7 +5,7 @@ import tomllib
5
5
  from importlib import resources
6
6
  from typing import *
7
7
 
8
- __all__ = ["SetDoc", "setdoc", "basic", "getbasicdoc"]
8
+ __all__ = ["SetDoc", "basic", "getbasicdoc", "setdoc"]
9
9
 
10
10
 
11
11
  class Util(enum.Enum):
@@ -14,9 +14,9 @@ class Util(enum.Enum):
14
14
  @functools.cached_property
15
15
  def data(self: Self) -> dict:
16
16
  "This cached property holds the cfg data."
17
- text: str = resources.read_text("setdoc.core", "cfg.toml")
18
- ans: dict = tomllib.loads(text)
19
- return ans
17
+ text: str
18
+ text = resources.read_text("setdoc.core", "cfg.toml")
19
+ return tomllib.loads(text)
20
20
 
21
21
 
22
22
  @dataclasses.dataclass
@@ -5,6 +5,7 @@ __and__ = "This magic method implements self&other."
5
5
  __bool__ = "This magic method implements bool(self)."
6
6
  __call__ = "This magic method implements calling self."
7
7
  __ceil__ = "This magic method implements math.ceil(self)."
8
+ __cmp__ = "This magic method implements all six comparison operators at once."
8
9
  __complex__ = "This magic method implements complex(self)."
9
10
  __contains__ = "This magic method implements other in self."
10
11
  __delitem__ = "This magic method implements del self[key]."
@@ -0,0 +1,11 @@
1
+ import unittest
2
+
3
+ __all__ = ["test"]
4
+
5
+
6
+ def test() -> unittest.TextTestResult:
7
+ loader: unittest.TestLoader
8
+ suite: unittest.TestSuite
9
+ loader = unittest.TestLoader()
10
+ suite = loader.discover(start_dir="setdoc.tests")
11
+ return unittest.TextTestRunner().run(suite)
@@ -1,3 +1,4 @@
1
+ import types
1
2
  import unittest
2
3
  from typing import *
3
4
 
@@ -29,6 +30,7 @@ class TestSetDocDecorator(unittest.TestCase):
29
30
  def my_method(self: Self) -> None:
30
31
  pass
31
32
 
33
+ instance: MyClass
32
34
  instance = MyClass()
33
35
  self.assertEqual(instance.my_method.__doc__, "This is a test method")
34
36
 
@@ -49,7 +51,8 @@ class TestSetDocDecorator(unittest.TestCase):
49
51
  def __init__(self, x):
50
52
  self.x = x
51
53
 
52
- instance: InitClass = InitClass(5)
54
+ instance: InitClass
55
+ instance = InitClass(5)
53
56
  self.assertEqual(InitClass.__doc__, "This is a class with __init__")
54
57
  self.assertEqual(instance.__doc__, "This is a class with __init__")
55
58
 
@@ -72,7 +75,8 @@ class TestSetDocDecorator(unittest.TestCase):
72
75
  def value(self: Self) -> None:
73
76
  return self._value
74
77
 
75
- instance: PropertyClass = PropertyClass(10)
78
+ instance: PropertyClass
79
+ instance = PropertyClass(10)
76
80
  self.assertEqual(PropertyClass.value.__doc__, "This is a property")
77
81
  self.assertEqual(instance.value, 10)
78
82
 
@@ -95,6 +99,7 @@ class TestSetDocDecorator(unittest.TestCase):
95
99
 
96
100
  return inner_func
97
101
 
102
+ nested_func: types.FunctionType
98
103
  nested_func = outer_func()
99
104
  self.assertEqual(nested_func.__doc__, "This is a nested function")
100
105
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setdoc
3
- Version: 1.2.7
3
+ Version: 1.2.9
4
4
  Summary: This project helps to set the doc string.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -1,11 +0,0 @@
1
- import unittest
2
-
3
- __all__ = ["test"]
4
-
5
-
6
- def test() -> unittest.TextTestResult:
7
- loader: unittest.TestLoader = unittest.TestLoader()
8
- tests: unittest.TestSuite = loader.discover(start_dir="setdoc.tests")
9
- runner: unittest.TextTestRunner = unittest.TextTestRunner()
10
- result: unittest.TextTestResult = runner.run(tests)
11
- return result
File without changes
File without changes
File without changes
File without changes
File without changes