setdoc 1.2.12__tar.gz → 1.2.14__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.
@@ -0,0 +1,2 @@
1
+ recursive-include docs *.rst
2
+ recursive-include src/setdoc *.toml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setdoc
3
- Version: 1.2.12
3
+ Version: 1.2.14
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)
@@ -45,4 +45,6 @@ Dynamic: license-file
45
45
  setdoc
46
46
  ======
47
47
 
48
- Visit the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_ for more information.
48
+ Each minor version has its own documentation.
49
+ These docs can be found as rst-files the ``docs/`` directory of this project.
50
+ They can also be viewed on the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_.
@@ -0,0 +1,7 @@
1
+ ======
2
+ setdoc
3
+ ======
4
+
5
+ Each minor version has its own documentation.
6
+ These docs can be found as rst-files the ``docs/`` directory of this project.
7
+ They can also be viewed on the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_.
@@ -0,0 +1,98 @@
1
+ Introduction
2
+ ------------
3
+
4
+ This project helps to set the doc string.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ To install setdoc, you can use pip. Open your terminal and run:
10
+
11
+ .. code-block:: shell
12
+
13
+ pip install setdoc
14
+
15
+ Features
16
+ --------
17
+
18
+ ``class setdoc.SetDoc(doc: Any)``
19
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
+
21
+ The instances of dataclass function as decorators that set the docstring of the decorated to the value of doc.
22
+
23
+ Usage:
24
+
25
+ .. code-block:: python
26
+
27
+ from typing import *
28
+ from setdoc import SetDoc
29
+
30
+ # Create a setdoc instance with the desired docstring
31
+ doc_updater: SetDoc
32
+ doc_updater = SetDoc("This function adds two numbers.")
33
+
34
+ # Apply it to a target function
35
+ @doc_updater
36
+ def add(a: int, b: int) -> int:
37
+ return a + b
38
+
39
+ # The function now has an updated docstring
40
+ print(add.__doc__)
41
+ # Output: This function adds two numbers.
42
+
43
+ # Apply it directly to another target function
44
+ @SetDoc("This function multiplies two numbers.")
45
+ def mul(a: int, b: int) -> int:
46
+ return a * b
47
+
48
+ # The function now has an updated docstring
49
+ print(mul.__doc__)
50
+ # Output: This function multiplies two numbers.
51
+
52
+ ``__call__(target: Any) -> Any``
53
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
+
55
+ This magic method implements calling the current instance. It sets ``target.__doc__`` to ``doc``.
56
+
57
+ ``doc: Any``
58
+ ^^^^^^^^^^^^
59
+
60
+ The value that is used for ``__doc__``.
61
+
62
+ ``setdoc.setdoc = setdoc.SetDoc``
63
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+
65
+ This module variable is alias for SetDoc included for legacy.
66
+
67
+ ``setdoc.test() -> unittest.TextTestResult``
68
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
+
70
+ This project can be tested through its test function.
71
+
72
+ .. code-block:: python
73
+
74
+ import setdoc
75
+ setdoc.test()
76
+
77
+ License
78
+ -------
79
+
80
+ This project is licensed under the MIT License.
81
+
82
+ Links
83
+ -----
84
+
85
+ - Download: https://pypi.org/project/setdoc/#files
86
+ - Index: https://pypi.org/project/setdoc/
87
+ - Source: https://github.com/johannes-programming/setdoc/
88
+ - Website: https://setdoc.johannes-programming.online/
89
+
90
+ Impressum
91
+ ---------
92
+
93
+ **Johannes Programming**
94
+
95
+ - Name: Johannes
96
+ - Email: johannes.programming@gmail.com
97
+ - Homepage: https://www.johannes-programming.online/
98
+ - Gravatar: https://www.johannes-programming.fyi/
@@ -0,0 +1,105 @@
1
+ Introduction
2
+ ------------
3
+
4
+ This project helps to set the doc string.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ To install setdoc, you can use pip. Open your terminal and run:
10
+
11
+ .. code-block:: shell
12
+
13
+ pip install setdoc
14
+
15
+ Features
16
+ --------
17
+
18
+ ``class setdoc.SetDoc(doc: Any)``
19
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
+
21
+ The instances of dataclass function as decorators that set the docstring of the decorated to the value of doc.
22
+
23
+ Usage:
24
+
25
+ .. code-block:: python
26
+
27
+ from typing import *
28
+ from setdoc import SetDoc
29
+
30
+ # Create a setdoc instance with the desired docstring
31
+ doc_updater: SetDoc
32
+ doc_updater = SetDoc("This function adds two numbers.")
33
+
34
+ # Apply it to a target function
35
+ @doc_updater
36
+ def add(a: int, b: int) -> int:
37
+ return a + b
38
+
39
+ # The function now has an updated docstring
40
+ print(add.__doc__)
41
+ # Output: This function adds two numbers.
42
+
43
+ # Apply it directly to another target function
44
+ @SetDoc("This function multiplies two numbers.")
45
+ def mul(a: int, b: int) -> int:
46
+ return a * b
47
+
48
+ # The function now has an updated docstring
49
+ print(mul.__doc__)
50
+ # Output: This function multiplies two numbers.
51
+
52
+ ``__call__(target: Any) -> Any``
53
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
+
55
+ This magic method implements calling the current instance. It sets ``target.__doc__`` to ``doc``.
56
+
57
+ ``doc: Any``
58
+ ^^^^^^^^^^^^
59
+
60
+ The value that is used for ``__doc__``.
61
+
62
+ ``setdoc.basic(value: Any) -> Any``
63
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+
65
+ .. container:: versionadded
66
+
67
+ **Added in version 1.1.**
68
+
69
+ ``setdoc.setdoc = setdoc.SetDoc``
70
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
+
72
+ This module variable is alias for SetDoc included for legacy.
73
+
74
+ ``setdoc.test() -> unittest.TextTestResult``
75
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+
77
+ This project can be tested through its test function.
78
+
79
+ .. code-block:: python
80
+
81
+ import setdoc
82
+ setdoc.test()
83
+
84
+ License
85
+ -------
86
+
87
+ This project is licensed under the MIT License.
88
+
89
+ Links
90
+ -----
91
+
92
+ - Download: https://pypi.org/project/setdoc/#files
93
+ - Index: https://pypi.org/project/setdoc/
94
+ - Source: https://github.com/johannes-programming/setdoc/
95
+ - Website: https://setdoc.johannes-programming.online/
96
+
97
+ Impressum
98
+ ---------
99
+
100
+ **Johannes Programming**
101
+
102
+ - Name: Johannes
103
+ - Email: johannes.programming@gmail.com
104
+ - Homepage: https://www.johannes-programming.online/
105
+ - Gravatar: https://www.johannes-programming.fyi/
@@ -0,0 +1,112 @@
1
+ Introduction
2
+ ------------
3
+
4
+ This project helps to set the doc string.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ To install setdoc, you can use pip. Open your terminal and run:
10
+
11
+ .. code-block:: shell
12
+
13
+ pip install setdoc
14
+
15
+ Features
16
+ --------
17
+
18
+ ``class setdoc.SetDoc(doc: Any)``
19
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
+
21
+ The instances of dataclass function as decorators that set the docstring of the decorated to the value of doc.
22
+
23
+ Usage:
24
+
25
+ .. code-block:: python
26
+
27
+ from typing import *
28
+ from setdoc import SetDoc
29
+
30
+ # Create a setdoc instance with the desired docstring
31
+ doc_updater: SetDoc
32
+ doc_updater = SetDoc("This function adds two numbers.")
33
+
34
+ # Apply it to a target function
35
+ @doc_updater
36
+ def add(a: int, b: int) -> int:
37
+ return a + b
38
+
39
+ # The function now has an updated docstring
40
+ print(add.__doc__)
41
+ # Output: This function adds two numbers.
42
+
43
+ # Apply it directly to another target function
44
+ @SetDoc("This function multiplies two numbers.")
45
+ def mul(a: int, b: int) -> int:
46
+ return a * b
47
+
48
+ # The function now has an updated docstring
49
+ print(mul.__doc__)
50
+ # Output: This function multiplies two numbers.
51
+
52
+ ``__call__(target: Any) -> Any``
53
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
+
55
+ This magic method implements calling the current instance. It sets ``target.__doc__`` to ``doc``.
56
+
57
+ ``doc: Any``
58
+ ^^^^^^^^^^^^
59
+
60
+ The value that is used for ``__doc__``.
61
+
62
+ ``setdoc.basic(value: Any) -> Any``
63
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+
65
+ .. container:: versionadded
66
+
67
+ **Added in version 1.1.**
68
+
69
+ ``setdoc.getbasicdoc(name: str) -> str``
70
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
+
72
+ .. container:: versionadded
73
+
74
+ **Added in version 1.2.**
75
+
76
+ ``setdoc.setdoc = setdoc.SetDoc``
77
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78
+
79
+ This module variable is alias for SetDoc included for legacy.
80
+
81
+ ``setdoc.test() -> unittest.TextTestResult``
82
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83
+
84
+ This project can be tested through its test function.
85
+
86
+ .. code-block:: python
87
+
88
+ import setdoc
89
+ setdoc.test()
90
+
91
+ License
92
+ -------
93
+
94
+ This project is licensed under the MIT License.
95
+
96
+ Links
97
+ -----
98
+
99
+ - Download: https://pypi.org/project/setdoc/#files
100
+ - Index: https://pypi.org/project/setdoc/
101
+ - Source: https://github.com/johannes-programming/setdoc/
102
+ - Website: https://setdoc.johannes-programming.online/
103
+
104
+ Impressum
105
+ ---------
106
+
107
+ **Johannes Programming**
108
+
109
+ - Name: Johannes
110
+ - Email: johannes.programming@gmail.com
111
+ - Homepage: https://www.johannes-programming.online/
112
+ - Gravatar: https://www.johannes-programming.fyi/
@@ -24,7 +24,7 @@ keywords = []
24
24
  name = "setdoc"
25
25
  readme = "README.rst"
26
26
  requires-python = ">=3.11"
27
- version = "1.2.12"
27
+ version = "1.2.14"
28
28
 
29
29
  [project.license]
30
30
  file = "LICENSE.txt"
@@ -8,6 +8,8 @@ __ceil__ = "This magic method implements math.ceil(self)."
8
8
  __cmp__ = "This magic method implements all six comparison operators at once."
9
9
  __complex__ = "This magic method implements complex(self)."
10
10
  __contains__ = "This magic method implements other in self."
11
+ __copy__ = "This magic method implements copy.copy(self)."
12
+ __deepcopy__ = "This magic method implements copy.deepcopy(self)."
11
13
  __delitem__ = "This magic method implements del self[key]."
12
14
  __divmod__ = "This magic method implements divmod(self, other)."
13
15
  __eq__ = "This magic method implements self==other."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setdoc
3
- Version: 1.2.12
3
+ Version: 1.2.14
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)
@@ -45,4 +45,6 @@ Dynamic: license-file
45
45
  setdoc
46
46
  ======
47
47
 
48
- Visit the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_ for more information.
48
+ Each minor version has its own documentation.
49
+ These docs can be found as rst-files the ``docs/`` directory of this project.
50
+ They can also be viewed on the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_.
@@ -3,6 +3,9 @@ MANIFEST.in
3
3
  README.rst
4
4
  pyproject.toml
5
5
  setup.cfg
6
+ docs/v1.0.rst
7
+ docs/v1.1.rst
8
+ docs/v1.2.rst
6
9
  src/setdoc/__init__.py
7
10
  src/setdoc.egg-info/PKG-INFO
8
11
  src/setdoc.egg-info/SOURCES.txt
setdoc-1.2.12/MANIFEST.in DELETED
@@ -1 +0,0 @@
1
- recursive-include src/setdoc *.toml
setdoc-1.2.12/README.rst DELETED
@@ -1,5 +0,0 @@
1
- ======
2
- setdoc
3
- ======
4
-
5
- Visit the website `https://setdoc.johannes-programming.online/ <https://setdoc.johannes-programming.online/>`_ for more information.
File without changes
File without changes
File without changes