docsig 0.65.0__tar.gz → 0.66.0__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.
- {docsig-0.65.0 → docsig-0.66.0}/PKG-INFO +4 -4
- {docsig-0.65.0 → docsig-0.66.0}/README.rst +3 -3
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_report.py +7 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_stub.py +6 -2
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_version.py +1 -1
- {docsig-0.65.0 → docsig-0.66.0}/docsig/messages.py +7 -0
- {docsig-0.65.0 → docsig-0.66.0}/pyproject.toml +3 -3
- {docsig-0.65.0 → docsig-0.66.0}/LICENSE +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/__init__.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/__main__.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_config.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_core.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_decorators.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_directives.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_files.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_hooks.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_main.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_module.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/_utils.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/plugin.py +0 -0
- {docsig-0.65.0 → docsig-0.66.0}/docsig/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: docsig
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.66.0
|
|
4
4
|
Summary: Check signature params for proper documentation
|
|
5
5
|
Home-page: https://pypi.org/project/docsig/
|
|
6
6
|
License: MIT
|
|
@@ -181,7 +181,7 @@ ensure your installation has registered `docsig`
|
|
|
181
181
|
.. code-block:: console
|
|
182
182
|
|
|
183
183
|
$ flake8 --version
|
|
184
|
-
7.1.0 (docsig: 0.
|
|
184
|
+
7.1.0 (docsig: 0.66.0, mccabe: 0.7.0, pycodestyle: 2.12.0, pyflakes: 3.2.0) CPython 3.8.13 on Darwin
|
|
185
185
|
|
|
186
186
|
And now use `flake8` to lint your files
|
|
187
187
|
|
|
@@ -270,7 +270,7 @@ Standalone
|
|
|
270
270
|
|
|
271
271
|
repos:
|
|
272
272
|
- repo: https://github.com/jshwi/docsig
|
|
273
|
-
rev: v0.
|
|
273
|
+
rev: v0.66.0
|
|
274
274
|
hooks:
|
|
275
275
|
- id: docsig
|
|
276
276
|
args:
|
|
@@ -289,7 +289,7 @@ or integrated with ``flake8``
|
|
|
289
289
|
hooks:
|
|
290
290
|
- id: flake8
|
|
291
291
|
additional_dependencies:
|
|
292
|
-
- docsig==0.
|
|
292
|
+
- docsig==0.66.0
|
|
293
293
|
args:
|
|
294
294
|
- "--sig-check-class"
|
|
295
295
|
- "--sig-check-dunders"
|
|
@@ -153,7 +153,7 @@ ensure your installation has registered `docsig`
|
|
|
153
153
|
.. code-block:: console
|
|
154
154
|
|
|
155
155
|
$ flake8 --version
|
|
156
|
-
7.1.0 (docsig: 0.
|
|
156
|
+
7.1.0 (docsig: 0.66.0, mccabe: 0.7.0, pycodestyle: 2.12.0, pyflakes: 3.2.0) CPython 3.8.13 on Darwin
|
|
157
157
|
|
|
158
158
|
And now use `flake8` to lint your files
|
|
159
159
|
|
|
@@ -242,7 +242,7 @@ Standalone
|
|
|
242
242
|
|
|
243
243
|
repos:
|
|
244
244
|
- repo: https://github.com/jshwi/docsig
|
|
245
|
-
rev: v0.
|
|
245
|
+
rev: v0.66.0
|
|
246
246
|
hooks:
|
|
247
247
|
- id: docsig
|
|
248
248
|
args:
|
|
@@ -261,7 +261,7 @@ or integrated with ``flake8``
|
|
|
261
261
|
hooks:
|
|
262
262
|
- id: flake8
|
|
263
263
|
additional_dependencies:
|
|
264
|
-
- docsig==0.
|
|
264
|
+
- docsig==0.66.0
|
|
265
265
|
args:
|
|
266
266
|
- "--sig-check-class"
|
|
267
267
|
- "--sig-check-dunders"
|
|
@@ -180,6 +180,13 @@ class Failure(_t.List[Failed]):
|
|
|
180
180
|
elif doc.name == _UNNAMED:
|
|
181
181
|
# param-incorrectly-documented
|
|
182
182
|
self._add(_E[303])
|
|
183
|
+
elif doc.closing_token != ":":
|
|
184
|
+
# bad-closing-token
|
|
185
|
+
self._add(
|
|
186
|
+
_E[304],
|
|
187
|
+
token=doc.closing_token,
|
|
188
|
+
hint=True,
|
|
189
|
+
)
|
|
183
190
|
|
|
184
191
|
def _sig4xx_parameters(self, doc: _Param, sig: _Param) -> None:
|
|
185
192
|
if doc.indent > 0:
|
|
@@ -84,6 +84,7 @@ class Param(_t.NamedTuple):
|
|
|
84
84
|
name: str | None = None
|
|
85
85
|
description: str | None = None
|
|
86
86
|
indent: int = 0
|
|
87
|
+
closing_token: str = ":"
|
|
87
88
|
|
|
88
89
|
def __eq__(self, other: object) -> bool:
|
|
89
90
|
if not isinstance(other, Param):
|
|
@@ -314,7 +315,9 @@ class Docstring(_Stub):
|
|
|
314
315
|
string = cls._normalize_docstring(node.value)
|
|
315
316
|
returns = bool(_re.search(r":returns?:", string))
|
|
316
317
|
docstring = cls(string, returns)
|
|
317
|
-
for match in _re.findall(
|
|
318
|
+
for match in _re.findall(
|
|
319
|
+
r":(.*?)([^\w\s])((?:.|\n)*?)(?=\n:|$)", string
|
|
320
|
+
):
|
|
318
321
|
if match:
|
|
319
322
|
kinds = match[0].split()
|
|
320
323
|
if kinds:
|
|
@@ -322,8 +325,9 @@ class Docstring(_Stub):
|
|
|
322
325
|
Param(
|
|
323
326
|
DocType.from_str(kinds[0]),
|
|
324
327
|
UNNAMED if len(kinds) == 1 else kinds[1],
|
|
325
|
-
match[
|
|
328
|
+
match[2] or None,
|
|
326
329
|
int(indent_anomaly),
|
|
330
|
+
match[1],
|
|
327
331
|
)
|
|
328
332
|
)
|
|
329
333
|
|
|
@@ -187,6 +187,13 @@ E = MessageMap(
|
|
|
187
187
|
"parameter appears to be incorrectly documented",
|
|
188
188
|
"param-incorrectly-documented",
|
|
189
189
|
),
|
|
190
|
+
304: Message(
|
|
191
|
+
"SIG304",
|
|
192
|
+
"SIG304",
|
|
193
|
+
"bad token used to close parameter declaration '{token}'",
|
|
194
|
+
"bad-closing-token",
|
|
195
|
+
"close a parameter declaration with ':'",
|
|
196
|
+
),
|
|
190
197
|
#: SIG4xx Description
|
|
191
198
|
401: Message(
|
|
192
199
|
"SIG401",
|
|
@@ -11,7 +11,7 @@ line-length = 79
|
|
|
11
11
|
allow_dirty = true
|
|
12
12
|
commit = true
|
|
13
13
|
commit_args = "-sS"
|
|
14
|
-
current_version = "0.
|
|
14
|
+
current_version = "0.66.0"
|
|
15
15
|
message = "bump: version {current_version} → {new_version}"
|
|
16
16
|
sign_tags = true
|
|
17
17
|
tag = true
|
|
@@ -131,7 +131,7 @@ maintainers = [
|
|
|
131
131
|
name = "docsig"
|
|
132
132
|
readme = "README.rst"
|
|
133
133
|
repository = "https://github.com/jshwi/docsig"
|
|
134
|
-
version = "0.
|
|
134
|
+
version = "0.66.0"
|
|
135
135
|
|
|
136
136
|
[tool.poetry.dependencies]
|
|
137
137
|
Sphinx = "^7.0.0"
|
|
@@ -143,7 +143,7 @@ wcmatch = ">=8.5.2,<11.0.0"
|
|
|
143
143
|
|
|
144
144
|
[tool.poetry.group.dev.dependencies]
|
|
145
145
|
black = "^24.4.2"
|
|
146
|
-
bump-my-version = ">=0.24.1,<0.
|
|
146
|
+
bump-my-version = ">=0.24.1,<0.30.0"
|
|
147
147
|
deptry = ">=0.16.1,<0.21.0"
|
|
148
148
|
docformatter = "^1.7.5"
|
|
149
149
|
flynt = "^1.0.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|