python-plugins 1.0.3__tar.gz → 1.0.4__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.
Files changed (116) hide show
  1. {python_plugins-1.0.3 → python_plugins-1.0.4}/CHANGES.rst +7 -0
  2. {python_plugins-1.0.3 → python_plugins-1.0.4}/PKG-INFO +1 -1
  3. python_plugins-1.0.4/docs/api/ospath.rst +17 -0
  4. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/conf.py +2 -0
  5. python_plugins-1.0.4/docs/examples/index.rst +12 -0
  6. python_plugins-1.0.4/docs/examples/sphinx_google_style.rst +8 -0
  7. python_plugins-1.0.4/docs/examples/sphinx_numpy_style.rst +8 -0
  8. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/index.rst +1 -0
  9. python_plugins-1.0.4/src/python_plugins/__about__.py +1 -0
  10. python_plugins-1.0.4/src/python_plugins/examples/sphinx_google_style.py +311 -0
  11. python_plugins-1.0.4/src/python_plugins/examples/sphinx_numpy_style.py +351 -0
  12. python_plugins-1.0.4/src/python_plugins/ospath/walk.py +31 -0
  13. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/db.py +3 -2
  14. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/__init__.py +1 -1
  15. python_plugins-1.0.4/src/python_plugins/sqla/utils/attr.py +85 -0
  16. python_plugins-1.0.4/src/python_plugins/sqla/utils/paginate.py +74 -0
  17. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/__init__.py +0 -2
  18. python_plugins-1.0.4/tests/sqla/models/__init__.py +23 -0
  19. python_plugins-1.0.3/src/python_plugins/sqla/models/association_proxy.py → python_plugins-1.0.4/tests/sqla/models/associationproxy.py +11 -11
  20. {python_plugins-1.0.3/src/python_plugins → python_plugins-1.0.4/tests}/sqla/models/demo.py +25 -26
  21. {python_plugins-1.0.3/src/python_plugins → python_plugins-1.0.4/tests}/sqla/models/multpk.py +3 -3
  22. {python_plugins-1.0.3/src/python_plugins → python_plugins-1.0.4/tests}/sqla/models/polymorphic.py +3 -3
  23. {python_plugins-1.0.3/src/python_plugins → python_plugins-1.0.4/tests}/sqla/models/relations.py +27 -8
  24. {python_plugins-1.0.3/src/python_plugins → python_plugins-1.0.4/tests}/sqla/models/tree_node.py +5 -5
  25. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_association_proxy.py +2 -2
  26. python_plugins-1.0.4/tests/sqla/test_db.py +110 -0
  27. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_mult_pk.py +1 -1
  28. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_polymorphic.py +1 -1
  29. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_relation.py +8 -8
  30. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_tree_node.py +1 -1
  31. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/utils/test_create_table.py +1 -1
  32. python_plugins-1.0.4/tests/sqla/utils/test_get_field_with_path.py +21 -0
  33. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/utils/test_inspect_mapper.py +33 -1
  34. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/utils/test_primary_key.py +2 -2
  35. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/utils/test_stmt_delete.py +2 -2
  36. python_plugins-1.0.3/docs/api/ospath.rst +0 -18
  37. python_plugins-1.0.3/src/python_plugins/__about__.py +0 -1
  38. python_plugins-1.0.3/src/python_plugins/ospath/walk_remove.py +0 -19
  39. python_plugins-1.0.3/src/python_plugins/sqla/models/message.py +0 -19
  40. python_plugins-1.0.3/src/python_plugins/sqla/models/model1.py +0 -161
  41. python_plugins-1.0.3/src/python_plugins/sqla/utils/attr.py +0 -110
  42. python_plugins-1.0.3/tests/sqla/test_db.py +0 -39
  43. {python_plugins-1.0.3 → python_plugins-1.0.4}/.github/workflows/release.yml +0 -0
  44. {python_plugins-1.0.3 → python_plugins-1.0.4}/.gitignore +0 -0
  45. {python_plugins-1.0.3 → python_plugins-1.0.4}/.readthedocs.yaml +0 -0
  46. {python_plugins-1.0.3 → python_plugins-1.0.4}/LICENSE.rst +0 -0
  47. {python_plugins-1.0.3 → python_plugins-1.0.4}/README.rst +0 -0
  48. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/Makefile +0 -0
  49. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/_static/style.css +0 -0
  50. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/api/crypto.rst +0 -0
  51. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/api/email.rst +0 -0
  52. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/api/index.rst +0 -0
  53. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/api/sqlalchemy.rst +0 -0
  54. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/changes.rst +0 -0
  55. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/install.rst +0 -0
  56. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/make.bat +0 -0
  57. {python_plugins-1.0.3 → python_plugins-1.0.4}/docs/requirements.txt +0 -0
  58. {python_plugins-1.0.3 → python_plugins-1.0.4}/pyproject.toml +0 -0
  59. {python_plugins-1.0.3 → python_plugins-1.0.4}/requirements/build.in +0 -0
  60. {python_plugins-1.0.3 → python_plugins-1.0.4}/requirements/develop.in +0 -0
  61. {python_plugins-1.0.3 → python_plugins-1.0.4}/requirements/example.in +0 -0
  62. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/__init__.py +0 -0
  63. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/__init__.py +0 -0
  64. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/aes_cipher.py +0 -0
  65. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/mixbyte.py +0 -0
  66. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/pbkdf_fernet.py +0 -0
  67. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/simple_fernet.py +0 -0
  68. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/tarmix.py +0 -0
  69. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/txtfile_cipher.py +0 -0
  70. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/crypto/zip7mix.py +0 -0
  71. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/email/__init__.py +0 -0
  72. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/email/smtp.py +0 -0
  73. {python_plugins-1.0.3/src/python_plugins/ospath → python_plugins-1.0.4/src/python_plugins/examples}/__init__.py +0 -0
  74. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/datetime.py +0 -0
  75. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/hashes.py +0 -0
  76. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/higher_order_functions.py +0 -0
  77. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/postgresql_dump.py +0 -0
  78. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/pretty.py +0 -0
  79. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/random_string.py +0 -0
  80. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/run_jwt.py +0 -0
  81. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/run_process.py +0 -0
  82. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/tkinter/calculate.py +0 -0
  83. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/examples/xml2dict.py +0 -0
  84. {python_plugins-1.0.3/src/python_plugins/sqla/models → python_plugins-1.0.4/src/python_plugins/ospath}/__init__.py +0 -0
  85. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/__init__.py +0 -0
  86. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/__init__.py +0 -0
  87. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/data_mixin.py +0 -0
  88. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/primary_key_mixin.py +0 -0
  89. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/timestamp_mixin.py +0 -0
  90. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/token_minxin.py +0 -0
  91. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/mixins/user_minxin.py +0 -0
  92. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/orm.py +0 -0
  93. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/expression.py +0 -0
  94. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/instance.py +0 -0
  95. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/model.py +0 -0
  96. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/stmt.py +0 -0
  97. {python_plugins-1.0.3 → python_plugins-1.0.4}/src/python_plugins/sqla/utils/update.py +0 -0
  98. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/__init__.py +0 -0
  99. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/conftest.py +0 -0
  100. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_aes_cipher.py +0 -0
  101. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_crypt_file.py +0 -0
  102. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_mixbyte.py +0 -0
  103. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_pbkdf_fernet.py +0 -0
  104. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_simple_fernet.py +0 -0
  105. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_tarmix.py +0 -0
  106. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/crypto/test_zip7mix.py +0 -0
  107. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_docs.py +0 -0
  108. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_flask_db.py +0 -0
  109. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/test_registry_mappers.py +0 -0
  110. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/sqla/utils/__init__.py +0 -0
  111. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/test_email.py +0 -0
  112. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/tmp/a.png +0 -0
  113. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/tmp/a.txt +0 -0
  114. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/tmp/test/test.txt +0 -0
  115. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/tmp/test.archive.mix +0 -0
  116. {python_plugins-1.0.3 → python_plugins-1.0.4}/tests/tmp/test.txt +0 -0
@@ -1,3 +1,10 @@
1
+ v1.0.4
2
+ ------
3
+ Released 2026-04-12
4
+
5
+ - sphinx google example
6
+ - find_empty_dirs in ospath.walk
7
+
1
8
  v1.0.3
2
9
  ------
3
10
  Released 2026-02-08
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-plugins
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: A collection of Python functions and classes.
5
5
  Project-URL: Documentation, https://python-plugins.readthedocs.io
6
6
  Project-URL: Source, https://github.com/ojso/python-plugins
@@ -0,0 +1,17 @@
1
+ ============
2
+ ospath
3
+ ============
4
+
5
+ .. code-block:: python
6
+
7
+ from python_plugins.ospath.walk import remove_pycache
8
+ from python_plugins.ospath.walk import remove_ipynb_checkpoints
9
+ from python_plugins.ospath.walk import find_empty_dirs
10
+
11
+
12
+ remove_pycache() # default is "."
13
+ remove_pycache("./tests")
14
+ remove_ipynb_checkpoints() # default is "."
15
+ find_empty_dirs() # default is "."
16
+
17
+
@@ -18,6 +18,8 @@ extensions = [
18
18
  "sphinx.ext.autodoc",
19
19
  "sphinx.ext.autosummary",
20
20
  "sphinx.ext.intersphinx",
21
+ "sphinx.ext.todo",
22
+ "sphinx.ext.napoleon",
21
23
  ]
22
24
 
23
25
  # intersphinx_mapping = {
@@ -0,0 +1,12 @@
1
+ ===========
2
+ examples
3
+ ===========
4
+
5
+ .. toctree::
6
+ :maxdepth: 2
7
+ :caption: Contents:
8
+
9
+ sphinx_google_style
10
+ sphinx_numpy_style
11
+
12
+
@@ -0,0 +1,8 @@
1
+ ======================
2
+ sphinx google style
3
+ ======================
4
+
5
+ This example shows how to use the Google style docstrings with Sphinx
6
+
7
+ .. automodule:: python_plugins.examples.sphinx_google_style
8
+ :members:
@@ -0,0 +1,8 @@
1
+ ======================
2
+ sphinx numpy style
3
+ ======================
4
+
5
+ This example shows how to use the Numpy style docstrings with Sphinx
6
+
7
+ .. automodule:: python_plugins.examples.sphinx_numpy_style
8
+ :members:
@@ -9,6 +9,7 @@ Welcome to python-plugins's documentation!
9
9
 
10
10
  install
11
11
  api/index
12
+ examples/index
12
13
  changes
13
14
 
14
15
  Indices and tables
@@ -0,0 +1 @@
1
+ __version__ = "1.0.4"
@@ -0,0 +1,311 @@
1
+ """Example Google style docstrings.
2
+
3
+ This module demonstrates documentation as specified by the `Google Python
4
+ Style Guide`_. Docstrings may extend over multiple lines. Sections are created
5
+ with a section header and a colon followed by a block of indented text.
6
+
7
+ Example:
8
+ Examples can be given using either the ``Example`` or ``Examples``
9
+ sections. Sections support any reStructuredText formatting, including
10
+ literal blocks::
11
+
12
+ $ python example_google.py
13
+
14
+ Section breaks are created by resuming unindented text. Section breaks
15
+ are also implicitly created anytime a new section starts.
16
+
17
+ Attributes:
18
+ module_level_variable1 (int): Module level variables may be documented in
19
+ either the ``Attributes`` section of the module docstring, or in an
20
+ inline docstring immediately following the variable.
21
+
22
+ Either form is acceptable, but the two should not be mixed. Choose
23
+ one convention to document module level variables and be consistent
24
+ with it.
25
+
26
+ Todo:
27
+ * For module TODOs
28
+ * You have to also use ``sphinx.ext.todo`` extension
29
+
30
+ .. _Google Python Style Guide:
31
+ https://google.github.io/styleguide/pyguide.html
32
+
33
+ """
34
+
35
+ module_level_variable1 = 12345
36
+
37
+ module_level_variable2 = 98765
38
+ """int: Module level variable documented inline.
39
+
40
+ The docstring may span multiple lines. The type may optionally be specified
41
+ on the first line, separated by a colon.
42
+ """
43
+
44
+
45
+ def function_with_types_in_docstring(param1, param2):
46
+ """Example function with types documented in the docstring.
47
+
48
+ :pep:`484` type annotations are supported. If attribute, parameter, and
49
+ return types are annotated according to `PEP 484`, they do not need to be
50
+ included in the docstring:
51
+
52
+ Args:
53
+ param1 (int): The first parameter.
54
+ param2 (str): The second parameter.
55
+
56
+ Returns:
57
+ bool: The return value. True for success, False otherwise.
58
+ """
59
+
60
+
61
+ def function_with_pep484_type_annotations(param1: int, param2: str) -> bool:
62
+ """Example function with PEP 484 type annotations.
63
+
64
+ Args:
65
+ param1: The first parameter.
66
+ param2: The second parameter.
67
+
68
+ Returns:
69
+ The return value. True for success, False otherwise.
70
+
71
+ """
72
+
73
+
74
+ def module_level_function(param1, param2=None, *args, **kwargs):
75
+ """This is an example of a module level function.
76
+
77
+ Function parameters should be documented in the ``Args`` section. The name
78
+ of each parameter is required. The type and description of each parameter
79
+ is optional, but should be included if not obvious.
80
+
81
+ If ``*args`` or ``**kwargs`` are accepted,
82
+ they should be listed as ``*args`` and ``**kwargs``.
83
+
84
+ The format for a parameter is::
85
+
86
+ name (type): description
87
+ The description may span multiple lines. Following
88
+ lines should be indented. The "(type)" is optional.
89
+
90
+ Multiple paragraphs are supported in parameter
91
+ descriptions.
92
+
93
+ Args:
94
+ param1 (int): The first parameter.
95
+ param2 (:obj:`str`, optional): The second parameter. Defaults to None.
96
+ Second line of description should be indented.
97
+ *args: Variable length argument list.
98
+ **kwargs: Arbitrary keyword arguments.
99
+
100
+ Returns:
101
+ bool: True if successful, False otherwise.
102
+
103
+ The return type is optional and may be specified at the beginning of
104
+ the ``Returns`` section followed by a colon.
105
+
106
+ The ``Returns`` section may span multiple lines and paragraphs.
107
+ Following lines should be indented to match the first line.
108
+
109
+ The ``Returns`` section supports any reStructuredText formatting,
110
+ including literal blocks::
111
+
112
+ {
113
+ 'param1': param1,
114
+ 'param2': param2,
115
+ }
116
+
117
+ Raises:
118
+ AttributeError: The ``Raises`` section is a list of all exceptions
119
+ that are relevant to the interface.
120
+ ValueError: If `param2` is equal to `param1`.
121
+
122
+ """
123
+ if param1 == param2:
124
+ msg = 'param1 may not be equal to param2'
125
+ raise ValueError(msg)
126
+ return True
127
+
128
+
129
+ def example_generator(n):
130
+ """Generators have a ``Yields`` section instead of a ``Returns`` section.
131
+
132
+ Args:
133
+ n (int): The upper limit of the range to generate, from 0 to `n` - 1.
134
+
135
+ Yields:
136
+ int: The next number in the range of 0 to `n` - 1.
137
+
138
+ Examples:
139
+ Examples should be written in doctest format, and should illustrate how
140
+ to use the function.
141
+
142
+ >>> print([i for i in example_generator(4)])
143
+ [0, 1, 2, 3]
144
+
145
+ """
146
+ yield from range(n)
147
+
148
+
149
+ class ExampleError(Exception):
150
+ """Exceptions are documented in the same way as classes.
151
+
152
+ The __init__ method may be documented in either the class level
153
+ docstring, or as a docstring on the __init__ method itself.
154
+
155
+ Either form is acceptable, but the two should not be mixed. Choose one
156
+ convention to document the __init__ method and be consistent with it.
157
+
158
+ Note:
159
+ Do not include the `self` parameter in the ``Args`` section.
160
+
161
+ Args:
162
+ msg (str): Human readable string describing the exception.
163
+ code (:obj:`int`, optional): Error code.
164
+
165
+ Attributes:
166
+ msg (str): Human readable string describing the exception.
167
+ code (int): Exception error code.
168
+
169
+ """
170
+
171
+ def __init__(self, msg, code):
172
+ self.msg = msg
173
+ self.code = code
174
+
175
+
176
+ class ExampleClass:
177
+ """The summary line for a class docstring should fit on one line.
178
+
179
+ If the class has public attributes, they may be documented here
180
+ in an ``Attributes`` section and follow the same formatting as a
181
+ function's ``Args`` section. Alternatively, attributes may be documented
182
+ inline with the attribute's declaration (see __init__ method below).
183
+
184
+ Properties created with the ``@property`` decorator should be documented
185
+ in the property's getter method.
186
+
187
+ Attributes:
188
+ attr1 (str): Description of `attr1`.
189
+ attr2 (:obj:`int`, optional): Description of `attr2`.
190
+
191
+ """
192
+
193
+ def __init__(self, param1, param2, param3):
194
+ """Example of docstring on the __init__ method.
195
+
196
+ The __init__ method may be documented in either the class level
197
+ docstring, or as a docstring on the __init__ method itself.
198
+
199
+ Either form is acceptable, but the two should not be mixed. Choose one
200
+ convention to document the __init__ method and be consistent with it.
201
+
202
+ Note:
203
+ Do not include the `self` parameter in the ``Args`` section.
204
+
205
+ Args:
206
+ param1 (str): Description of `param1`.
207
+ param2 (:obj:`int`, optional): Description of `param2`. Multiple
208
+ lines are supported.
209
+ param3 (list(str)): Description of `param3`.
210
+
211
+ """
212
+ self.attr1 = param1
213
+ self.attr2 = param2
214
+ self.attr3 = param3 #: Doc comment *inline* with attribute
215
+
216
+ #: list(str): Doc comment *before* attribute, with type specified
217
+ self.attr4 = ['attr4']
218
+
219
+ self.attr5 = None
220
+ """str: Docstring *after* attribute, with type specified."""
221
+
222
+ @property
223
+ def readonly_property(self):
224
+ """str: Properties should be documented in their getter method."""
225
+ return 'readonly_property'
226
+
227
+ @property
228
+ def readwrite_property(self):
229
+ """list(str): Properties with both a getter and setter
230
+ should only be documented in their getter method.
231
+
232
+ If the setter method contains notable behavior, it should be
233
+ mentioned here.
234
+ """
235
+ return ['readwrite_property']
236
+
237
+ @readwrite_property.setter
238
+ def readwrite_property(self, value):
239
+ _ = value
240
+
241
+ def example_method(self, param1, param2):
242
+ """Class methods are similar to regular functions.
243
+
244
+ Note:
245
+ Do not include the `self` parameter in the ``Args`` section.
246
+
247
+ Args:
248
+ param1: The first parameter.
249
+ param2: The second parameter.
250
+
251
+ Returns:
252
+ True if successful, False otherwise.
253
+
254
+ """
255
+ return True
256
+
257
+ def __special__(self):
258
+ """By default special members with docstrings are not included.
259
+
260
+ Special members are any methods or attributes that start with and
261
+ end with a double underscore. Any special member with a docstring
262
+ will be included in the output, if
263
+ ``napoleon_include_special_with_doc`` is set to True.
264
+
265
+ This behavior can be enabled by changing the following setting in
266
+ Sphinx's conf.py::
267
+
268
+ napoleon_include_special_with_doc = True
269
+
270
+ """
271
+ pass
272
+
273
+ def __special_without_docstring__(self):
274
+ pass
275
+
276
+ def _private(self):
277
+ """By default private members are not included.
278
+
279
+ Private members are any methods or attributes that start with an
280
+ underscore and are *not* special. By default they are not included
281
+ in the output.
282
+
283
+ This behavior can be changed such that private members *are* included
284
+ by changing the following setting in Sphinx's conf.py::
285
+
286
+ napoleon_include_private_with_doc = True
287
+
288
+ """
289
+ pass
290
+
291
+ def _private_without_docstring(self):
292
+ pass
293
+
294
+
295
+ class ExamplePEP526Class:
296
+ """The summary line for a class docstring should fit on one line.
297
+
298
+ If the class has public attributes, they may be documented here
299
+ in an ``Attributes`` section and follow the same formatting as a
300
+ function's ``Args`` section. If ``napoleon_attr_annotations``
301
+ is True, types can be specified in the class body using ``PEP 526``
302
+ annotations.
303
+
304
+ Attributes:
305
+ attr1: Description of `attr1`.
306
+ attr2: Description of `attr2`.
307
+
308
+ """
309
+
310
+ attr1: str
311
+ attr2: int