docstring-format-checker 1.11.5__tar.gz → 1.12.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.
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/PKG-INFO +4 -4
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/pyproject.toml +17 -25
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/pyproject.toml.orig +17 -27
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/core.py +29 -27
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/README.md +0 -0
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/__init__.py +0 -0
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/cli.py +0 -0
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/config.py +0 -0
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/utils/__init__.py +0 -0
- {docstring_format_checker-1.11.5 → docstring_format_checker-1.12.0}/src/docstring_format_checker/utils/exceptions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docstring-format-checker
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.12.0
|
|
4
4
|
Summary: A CLI tool to check and validate Python docstring formatting and completeness
|
|
5
5
|
Author: Chris Mahoney
|
|
6
6
|
Author-email: Chris Mahoney <docstring-format-checker@data-science-extensions.com>
|
|
@@ -12,22 +12,22 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
12
12
|
Classifier: Topic :: Software Development :: Testing :: Unit
|
|
13
13
|
Classifier: Topic :: Utilities
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
21
21
|
Classifier: Intended Audience :: Developers
|
|
22
22
|
Classifier: Environment :: Console
|
|
23
|
-
Requires-Dist: typer>=0.9.0
|
|
23
|
+
Requires-Dist: typer>=0.9.0,<1
|
|
24
24
|
Requires-Dist: tomli>=2.0.0 ; python_full_version < '3.11'
|
|
25
25
|
Requires-Dist: rich>=13.0.0
|
|
26
26
|
Requires-Dist: toolbox-python==1.*
|
|
27
27
|
Requires-Dist: pyfiglet==1.*
|
|
28
28
|
Maintainer: Chris Mahoney
|
|
29
29
|
Maintainer-email: Chris Mahoney <docstring-format-checker@data-science-extensions.com>
|
|
30
|
-
Requires-Python: >=3.
|
|
30
|
+
Requires-Python: >=3.10
|
|
31
31
|
Project-URL: Homepage, https://data-science-extensions.com/toolboxes/docstring-format-checker
|
|
32
32
|
Project-URL: Documentation, https://data-science-extensions.com/toolboxes/docstring-format-checker/latest/code/
|
|
33
33
|
Project-URL: Repository, https://github.com/data-science-extensions/docstring-format-checker
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "docstring-format-checker"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.12.0"
|
|
4
4
|
description = "A CLI tool to check and validate Python docstring formatting and completeness"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -12,18 +12,18 @@ classifiers = [
|
|
|
12
12
|
"Topic :: Software Development :: Testing :: Unit",
|
|
13
13
|
"Topic :: Utilities",
|
|
14
14
|
"Programming Language :: Python :: 3",
|
|
15
|
-
"Programming Language :: Python :: 3.9",
|
|
16
15
|
"Programming Language :: Python :: 3.10",
|
|
17
16
|
"Programming Language :: Python :: 3.11",
|
|
18
17
|
"Programming Language :: Python :: 3.12",
|
|
19
18
|
"Programming Language :: Python :: 3.13",
|
|
20
19
|
"Programming Language :: Python :: 3.14",
|
|
20
|
+
"Programming Language :: Python :: 3.15",
|
|
21
21
|
"Intended Audience :: Developers",
|
|
22
22
|
"Environment :: Console",
|
|
23
23
|
]
|
|
24
|
-
requires-python = ">=3.
|
|
24
|
+
requires-python = ">=3.10"
|
|
25
25
|
dependencies = [
|
|
26
|
-
"typer>=0.9.0",
|
|
26
|
+
"typer>=0.9.0,<1",
|
|
27
27
|
"tomli>=2.0.0; python_version<'3.11'",
|
|
28
28
|
"rich>=13.0.0",
|
|
29
29
|
"toolbox-python==1.*",
|
|
@@ -51,52 +51,44 @@ dfc = "docstring_format_checker.cli:entry_point"
|
|
|
51
51
|
|
|
52
52
|
[dependency-groups]
|
|
53
53
|
dev = [
|
|
54
|
-
"black==
|
|
55
|
-
"black==26.*; python_version>='3.10'",
|
|
54
|
+
"black==26.*",
|
|
56
55
|
"blacken-docs==1.*",
|
|
57
56
|
"codespell==2.*",
|
|
58
|
-
"ipykernel==
|
|
59
|
-
"
|
|
60
|
-
"isort==6.*; python_version<'3.10'",
|
|
61
|
-
"isort>=7,<10; python_version>='3.10'",
|
|
57
|
+
"ipykernel==7.*",
|
|
58
|
+
"isort==9.*",
|
|
62
59
|
"prek==0.*",
|
|
63
60
|
"pycln==2.*",
|
|
64
|
-
"pylint==
|
|
65
|
-
"pylint==4.*; python_version>='3.10'",
|
|
61
|
+
"pylint==4.*",
|
|
66
62
|
"pyright==1.*",
|
|
67
63
|
"pyupgrade==3.*",
|
|
68
64
|
"uv==0.*",
|
|
69
|
-
"pip>=
|
|
65
|
+
"pip>=26.1.2,<27",
|
|
70
66
|
]
|
|
71
67
|
docs = [
|
|
72
|
-
"black==
|
|
73
|
-
"
|
|
74
|
-
"docstring-inheritance==2.*; python_version<'3.10'",
|
|
75
|
-
"docstring-inheritance==3.*; python_version>='3.10'",
|
|
68
|
+
"black==26.*",
|
|
69
|
+
"docstring-inheritance==3.*",
|
|
76
70
|
"livereload==2.*",
|
|
77
71
|
"mike==2.*",
|
|
78
72
|
"mkdocs==1.*",
|
|
79
73
|
"mkdocs-autorefs==1.*",
|
|
80
74
|
"mkdocs-coverage==2.*",
|
|
81
75
|
"mkdocs-material==9.*",
|
|
82
|
-
"mkdocstrings==
|
|
83
|
-
"mkdocstrings==
|
|
84
|
-
"mkdocstrings-python==1.*; python_version<'3.10'",
|
|
85
|
-
"mkdocstrings-python==2.*; python_version>='3.10'",
|
|
76
|
+
"mkdocstrings==1.*",
|
|
77
|
+
"mkdocstrings-python==2.*",
|
|
86
78
|
"pygithub==2.*",
|
|
87
79
|
]
|
|
88
80
|
test = [
|
|
89
81
|
"ty==0.*",
|
|
82
|
+
"tomli>=2.0.0",
|
|
90
83
|
"parameterized==0.*",
|
|
91
|
-
"pytest==
|
|
92
|
-
"pytest==9.*; python_version>='3.10'",
|
|
84
|
+
"pytest==9.*",
|
|
93
85
|
"pytest-clarity==1.*",
|
|
94
86
|
"pytest-cov==7.*",
|
|
95
87
|
"pytest-icdiff==0.*",
|
|
96
88
|
"pytest-sugar==1.*",
|
|
97
89
|
"pytest-xdist==3.*",
|
|
98
90
|
"requests==2.*",
|
|
99
|
-
"complexipy
|
|
91
|
+
"complexipy>=5,<9",
|
|
100
92
|
]
|
|
101
93
|
|
|
102
94
|
[tool.black]
|
|
@@ -265,5 +257,5 @@ admonition = "note"
|
|
|
265
257
|
prefix = "???"
|
|
266
258
|
|
|
267
259
|
[build-system]
|
|
268
|
-
requires = ["uv_build>=0.12.23,<0.
|
|
260
|
+
requires = ["uv_build>=0.12.23,<0.14"]
|
|
269
261
|
build-backend = "uv_build"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "docstring-format-checker"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.12.0"
|
|
4
4
|
description = "A CLI tool to check and validate Python docstring formatting and completeness"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -18,18 +18,18 @@ classifiers = [
|
|
|
18
18
|
"Topic :: Software Development :: Testing :: Unit",
|
|
19
19
|
"Topic :: Utilities",
|
|
20
20
|
"Programming Language :: Python :: 3",
|
|
21
|
-
"Programming Language :: Python :: 3.9",
|
|
22
21
|
"Programming Language :: Python :: 3.10",
|
|
23
22
|
"Programming Language :: Python :: 3.11",
|
|
24
23
|
"Programming Language :: Python :: 3.12",
|
|
25
24
|
"Programming Language :: Python :: 3.13",
|
|
26
25
|
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
27
27
|
"Intended Audience :: Developers",
|
|
28
28
|
"Environment :: Console",
|
|
29
29
|
]
|
|
30
|
-
requires-python = ">=3.
|
|
30
|
+
requires-python = ">=3.10"
|
|
31
31
|
dependencies = [
|
|
32
|
-
"typer>=0.9.0",
|
|
32
|
+
"typer>=0.9.0,<1",
|
|
33
33
|
"tomli>=2.0.0; python_version<'3.11'",
|
|
34
34
|
"rich>=13.0.0",
|
|
35
35
|
"toolbox-python==1.*",
|
|
@@ -49,54 +49,44 @@ dfc = "docstring_format_checker.cli:entry_point"
|
|
|
49
49
|
|
|
50
50
|
[dependency-groups]
|
|
51
51
|
dev = [
|
|
52
|
-
|
|
53
|
-
"black==25.*; python_version<'3.10'",
|
|
54
|
-
"black==26.*; python_version>='3.10'",
|
|
52
|
+
"black==26.*",
|
|
55
53
|
"blacken-docs==1.*",
|
|
56
54
|
"codespell==2.*",
|
|
57
|
-
"ipykernel==
|
|
58
|
-
"
|
|
59
|
-
"isort==6.*; python_version<'3.10'",
|
|
60
|
-
"isort>=7,<10; python_version>='3.10'",
|
|
55
|
+
"ipykernel==7.*",
|
|
56
|
+
"isort==9.*",
|
|
61
57
|
"prek==0.*",
|
|
62
58
|
"pycln==2.*",
|
|
63
|
-
"pylint==
|
|
64
|
-
"pylint==4.*; python_version>='3.10'",
|
|
59
|
+
"pylint==4.*",
|
|
65
60
|
"pyright==1.*",
|
|
66
61
|
"pyupgrade==3.*",
|
|
67
62
|
"uv==0.*",
|
|
68
|
-
"pip>=
|
|
63
|
+
"pip>=26.1.2,<27",
|
|
69
64
|
]
|
|
70
65
|
docs = [
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"black==26.*; python_version>='3.10'",
|
|
74
|
-
"docstring-inheritance==2.*; python_version<'3.10'",
|
|
75
|
-
"docstring-inheritance==3.*; python_version>='3.10'",
|
|
66
|
+
"black==26.*",
|
|
67
|
+
"docstring-inheritance==3.*",
|
|
76
68
|
"livereload==2.*",
|
|
77
69
|
"mike==2.*",
|
|
78
70
|
"mkdocs==1.*",
|
|
79
71
|
"mkdocs-autorefs==1.*",
|
|
80
72
|
"mkdocs-coverage==2.*",
|
|
81
73
|
"mkdocs-material==9.*",
|
|
82
|
-
"mkdocstrings==
|
|
83
|
-
"mkdocstrings==
|
|
84
|
-
"mkdocstrings-python==1.*; python_version<'3.10'",
|
|
85
|
-
"mkdocstrings-python==2.*; python_version>='3.10'",
|
|
74
|
+
"mkdocstrings==1.*",
|
|
75
|
+
"mkdocstrings-python==2.*",
|
|
86
76
|
"pygithub==2.*",
|
|
87
77
|
]
|
|
88
78
|
test = [
|
|
89
79
|
"ty==0.*",
|
|
80
|
+
"tomli>=2.0.0",
|
|
90
81
|
"parameterized==0.*",
|
|
91
|
-
"pytest==
|
|
92
|
-
"pytest==9.*; python_version>='3.10'",
|
|
82
|
+
"pytest==9.*",
|
|
93
83
|
"pytest-clarity==1.*",
|
|
94
84
|
"pytest-cov==7.*",
|
|
95
85
|
"pytest-icdiff==0.*",
|
|
96
86
|
"pytest-sugar==1.*",
|
|
97
87
|
"pytest-xdist==3.*",
|
|
98
88
|
"requests==2.*",
|
|
99
|
-
"complexipy
|
|
89
|
+
"complexipy>=5,<9",
|
|
100
90
|
]
|
|
101
91
|
|
|
102
92
|
[tool.black]
|
|
@@ -215,5 +205,5 @@ sections = [
|
|
|
215
205
|
]
|
|
216
206
|
|
|
217
207
|
[build-system]
|
|
218
|
-
requires = ["uv_build>=0.12.23,<0.
|
|
208
|
+
requires = ["uv_build>=0.12.23,<0.14"]
|
|
219
209
|
build-backend = "uv_build"
|
|
@@ -1962,22 +1962,23 @@ class DocstringChecker:
|
|
|
1962
1962
|
for line in docstring.split("\n"):
|
|
1963
1963
|
line: str = line.strip()
|
|
1964
1964
|
match: Optional[re.Match[str]] = re.match(section_pattern, line)
|
|
1965
|
-
if match:
|
|
1966
|
-
|
|
1967
|
-
|
|
1965
|
+
if not match:
|
|
1966
|
+
continue
|
|
1967
|
+
|
|
1968
|
+
section_word: str = match.group(1)
|
|
1969
|
+
section_name_lower: str = section_word.lower()
|
|
1970
|
+
section_config: Optional[SectionConfig] = next(
|
|
1971
|
+
(s for s in self.sections_config if s.name.lower() == section_name_lower), None
|
|
1972
|
+
)
|
|
1973
|
+
if not section_config or section_config.admonition is not False:
|
|
1974
|
+
continue
|
|
1968
1975
|
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1976
|
+
expected_title_case: str = section_config.name.title()
|
|
1977
|
+
if section_word != expected_title_case:
|
|
1978
|
+
errors.append(
|
|
1979
|
+
f"Section '{section_name_lower}' must be in title case as '{expected_title_case}', "
|
|
1980
|
+
f"found: '{section_word}'"
|
|
1972
1981
|
)
|
|
1973
|
-
if section_config and section_config.admonition is False:
|
|
1974
|
-
# Check if it's title case
|
|
1975
|
-
expected_title_case: str = section_config.name.title()
|
|
1976
|
-
if section_word != expected_title_case:
|
|
1977
|
-
errors.append(
|
|
1978
|
-
f"Section '{section_name_lower}' must be in title case as '{expected_title_case}', "
|
|
1979
|
-
f"found: '{section_word}'"
|
|
1980
|
-
)
|
|
1981
1982
|
|
|
1982
1983
|
return errors
|
|
1983
1984
|
|
|
@@ -2091,20 +2092,21 @@ class DocstringChecker:
|
|
|
2091
2092
|
section_name: str = admonition_match.group(1)
|
|
2092
2093
|
return next((s for s in parentheses_sections if s.name.lower() == section_name.lower()), None)
|
|
2093
2094
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
# Match section names (can include spaces) followed by an optional colon
|
|
2097
|
-
simple_section_match: Optional[re.Match[str]] = re.match(r"^([A-Z][\w\s]+):?$", stripped_line)
|
|
2098
|
-
if simple_section_match:
|
|
2099
|
-
section_name: str = simple_section_match.group(1).strip()
|
|
2100
|
-
# Check if it's a known section
|
|
2101
|
-
potential_section: Optional[SectionConfig] = next(
|
|
2102
|
-
(s for s in self.sections_config if s.name.lower() == section_name.lower()), None
|
|
2103
|
-
)
|
|
2104
|
-
if potential_section:
|
|
2105
|
-
return next((s for s in parentheses_sections if s.name.lower() == section_name.lower()), None)
|
|
2095
|
+
if full_line.startswith((" ", "\t")):
|
|
2096
|
+
return None
|
|
2106
2097
|
|
|
2107
|
-
|
|
2098
|
+
simple_section_match: Optional[re.Match[str]] = re.match(r"^([A-Z][\w\s]+):?$", stripped_line)
|
|
2099
|
+
if not simple_section_match:
|
|
2100
|
+
return None
|
|
2101
|
+
|
|
2102
|
+
section_name: str = simple_section_match.group(1).strip()
|
|
2103
|
+
potential_section: Optional[SectionConfig] = next(
|
|
2104
|
+
(s for s in self.sections_config if s.name.lower() == section_name.lower()), None
|
|
2105
|
+
)
|
|
2106
|
+
if not potential_section:
|
|
2107
|
+
return None
|
|
2108
|
+
|
|
2109
|
+
return next((s for s in parentheses_sections if s.name.lower() == section_name.lower()), None)
|
|
2108
2110
|
|
|
2109
2111
|
def _is_content_line(self, stripped_line: str) -> bool:
|
|
2110
2112
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|