docstringify 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

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.
@@ -28,11 +28,7 @@ class DocstringNode:
28
28
 
29
29
  @overload
30
30
  def __init__(
31
- self,
32
- node: ast.Module,
33
- module_name: str,
34
- source_code: str,
35
- parent: None = None,
31
+ self, node: ast.Module, module_name: str, source_code: str, parent: None = None
36
32
  ) -> None: ...
37
33
 
38
34
  @overload
@@ -141,7 +141,7 @@ class FunctionDocstringNode(DocstringNode):
141
141
  return self.get_source_segment(arg.annotation) or PARAMETER_TYPE_PLACEHOLDER
142
142
 
143
143
  def _extract_default_values(
144
- self, default: ast.Constant | None | Literal[NO_DEFAULT], is_keyword_only: bool
144
+ self, default: ast.Constant | Literal[NO_DEFAULT] | None, is_keyword_only: bool
145
145
  ) -> str | Literal[NO_DEFAULT]:
146
146
  """
147
147
  Extract the argument's default value.
@@ -3,7 +3,4 @@
3
3
  from .transformer import DocstringTransformer
4
4
  from .visitor import DocstringVisitor
5
5
 
6
- __all__ = [
7
- 'DocstringTransformer',
8
- 'DocstringVisitor',
9
- ]
6
+ __all__ = ['DocstringTransformer', 'DocstringVisitor']
@@ -164,9 +164,7 @@ class DocstringTransformer(ast.NodeTransformer, DocstringVisitor):
164
164
  output_lines.append(
165
165
  indent(
166
166
  self.docstring_converter.format_docstring(
167
- docstring.splitlines(),
168
- indent=0,
169
- quote=True,
167
+ docstring.splitlines(), indent=0, quote=True
170
168
  )
171
169
  + (f'\n{suffix}' if suffix else ''),
172
170
  ' ' * prefix,
@@ -199,8 +197,7 @@ class DocstringTransformer(ast.NodeTransformer, DocstringVisitor):
199
197
  )
200
198
 
201
199
  suggested_docstring = self.docstring_converter.suggest_docstring(
202
- docstring_node,
203
- indent=indent,
200
+ docstring_node, indent=indent
204
201
  )
205
202
  docstring_ast_node = ast.Expr(ast.Constant(suggested_docstring))
206
203
 
@@ -135,30 +135,22 @@ class DocstringVisitor(ast.NodeVisitor):
135
135
 
136
136
  @overload
137
137
  def visit_docstring(
138
- self,
139
- node: ast.Module,
140
- docstring_class: type[DocstringNode],
138
+ self, node: ast.Module, docstring_class: type[DocstringNode]
141
139
  ) -> ast.Module: ...
142
140
 
143
141
  @overload
144
142
  def visit_docstring(
145
- self,
146
- node: ast.ClassDef,
147
- docstring_class: type[DocstringNode],
143
+ self, node: ast.ClassDef, docstring_class: type[DocstringNode]
148
144
  ) -> ast.ClassDef: ...
149
145
 
150
146
  @overload
151
147
  def visit_docstring(
152
- self,
153
- node: ast.FunctionDef,
154
- docstring_class: type[FunctionDocstringNode],
148
+ self, node: ast.FunctionDef, docstring_class: type[FunctionDocstringNode]
155
149
  ) -> ast.FunctionDef: ...
156
150
 
157
151
  @overload
158
152
  def visit_docstring(
159
- self,
160
- node: ast.AsyncFunctionDef,
161
- docstring_class: type[FunctionDocstringNode],
153
+ self, node: ast.AsyncFunctionDef, docstring_class: type[FunctionDocstringNode]
162
154
  ) -> ast.AsyncFunctionDef: ...
163
155
 
164
156
  def visit_docstring(
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: docstringify
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Flag missing docstrings and, optionally, generate them from signatures and type annotations.
5
5
  Project-URL: Documentation, https://github.com/stefmolin/docstringify
6
6
  Project-URL: Homepage, https://github.com/stefmolin/docstringify
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
19
20
  Requires-Python: >=3.11
20
21
  Description-Content-Type: text/markdown
21
22
 
@@ -104,6 +105,7 @@ You can use Docstringify in three modes:
104
105
  ```python
105
106
  """__description__"""
106
107
 
108
+
107
109
  def say_hello(name: str = 'World') -> None:
108
110
  """
109
111
  __description__
@@ -9,13 +9,13 @@ docstringify/converters/google.py,sha256=VhCvIbe9SpgXJXOAB_wLzhzY6ONjNdcVp01_VYR
9
9
  docstringify/converters/numpydoc.py,sha256=jpa5GQCV1vldyW7AqQ-wa_U_4nLrcjh2E-opxmURkDw,4693
10
10
  docstringify/converters/stub.py,sha256=khs8L5xTCoSZxZM8WCjzbm2VM6fa3rR9w5rchZu2NCs,3687
11
11
  docstringify/nodes/__init__.py,sha256=nNCajaWkQJGRv5cKdWyo43JDfSsBUrlnCL8JRTaW4cI,26
12
- docstringify/nodes/base.py,sha256=aAJ4hy9sA0Seabp8Qn5isOEYbuJhCx_MuaXjViYfem4,3399
13
- docstringify/nodes/function.py,sha256=c8kUtZTP2aMKbJvEx_8ElJTpvwpJdhrFUgEv_ZD8LE0,11693
14
- docstringify/traversal/__init__.py,sha256=fy9DEvmXm4sJyf4dAJI-patQPoL8_zPgPpda84q0a-4,188
15
- docstringify/traversal/transformer.py,sha256=JpTzb6Bd3CoYd0SQLa02sEH7yWbsl2saZytCUJr6FUc,8670
16
- docstringify/traversal/visitor.py,sha256=bsGLwNy-k7DDPuvQxqZHnfn0sML7GIGbv7fvDVIOrGs,9000
17
- docstringify-2.0.0.dist-info/METADATA,sha256=JezS1D2yxruKE4Qwgoz7cDkUrnUGxJ9aW5RAGufDOOM,8760
18
- docstringify-2.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
19
- docstringify-2.0.0.dist-info/entry_points.txt,sha256=dJVPsbclB7stLE8g0d4WbO2NaZQLJXSLEVl6oeROAqI,55
20
- docstringify-2.0.0.dist-info/licenses/LICENSE,sha256=E5RHv_qfCZPwnlJ_ZQb-WKOOy07LaJBA2a160OGtT3U,1071
21
- docstringify-2.0.0.dist-info/RECORD,,
12
+ docstringify/nodes/base.py,sha256=b7IgsObL-VTAA1n0qDyzMfg0M_iL0D7JoyubPArwAJM,3366
13
+ docstringify/nodes/function.py,sha256=-kgrG78AI7IZfeFmEihSV2TbraS-psr9VSm_gCRCyxA,11693
14
+ docstringify/traversal/__init__.py,sha256=e2ORnb7EkENo3nDtXi6dyizq28FwoiuYPKRairB9Ax4,177
15
+ docstringify/traversal/transformer.py,sha256=_wZKrsNY6iPM0PdJzcxYNwfWU7BMCCAhWIQwUVg-JvI,8608
16
+ docstringify/traversal/visitor.py,sha256=YUV2ihIWE8aopkuBmc3SlSuGrM3Q-Fe7M-dciPpcz-M,8932
17
+ docstringify-2.0.1.dist-info/METADATA,sha256=jgEEOq3g2vEMbVx3xkvqLSPwxDq2cIJROyIVS1HL4AA,8812
18
+ docstringify-2.0.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
19
+ docstringify-2.0.1.dist-info/entry_points.txt,sha256=dJVPsbclB7stLE8g0d4WbO2NaZQLJXSLEVl6oeROAqI,55
20
+ docstringify-2.0.1.dist-info/licenses/LICENSE,sha256=E5RHv_qfCZPwnlJ_ZQb-WKOOy07LaJBA2a160OGtT3U,1071
21
+ docstringify-2.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.29.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any