docstring-format-checker 1.11.0__tar.gz → 1.11.2__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.0 → docstring_format_checker-1.11.2}/PKG-INFO +1 -1
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/pyproject.toml +2 -1
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/src/docstring_format_checker/config.py +2 -2
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/src/docstring_format_checker/core.py +8 -2
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/README.md +0 -0
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/src/docstring_format_checker/__init__.py +0 -0
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/src/docstring_format_checker/cli.py +0 -0
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/src/docstring_format_checker/utils/__init__.py +0 -0
- {docstring_format_checker-1.11.0 → docstring_format_checker-1.11.2}/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.11.
|
|
3
|
+
Version: 1.11.2
|
|
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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "docstring-format-checker"
|
|
3
|
-
version = "1.11.
|
|
3
|
+
version = "1.11.2"
|
|
4
4
|
description = "A CLI tool to check and validate Python docstring formatting and completeness"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -60,6 +60,7 @@ dev = [
|
|
|
60
60
|
"pycln==2.*",
|
|
61
61
|
"pylint==3.*; python_version<'3.10'",
|
|
62
62
|
"pylint==4.*; python_version>='3.10'",
|
|
63
|
+
"pyright==1.*",
|
|
63
64
|
"pyupgrade==3.*",
|
|
64
65
|
"uv==0.*",
|
|
65
66
|
"pip==25.*",
|
|
@@ -492,7 +492,7 @@ def _parse_sections_config(tool_config: dict[str, Any]) -> list[SectionConfig]:
|
|
|
492
492
|
admonition_value = False # Use SectionConfig default
|
|
493
493
|
|
|
494
494
|
section = SectionConfig(
|
|
495
|
-
order=section_data.get("order"
|
|
495
|
+
order=section_data.get("order"),
|
|
496
496
|
name=section_data.get("name", ""),
|
|
497
497
|
type=section_data.get("type", ""),
|
|
498
498
|
admonition=admonition_value,
|
|
@@ -506,7 +506,7 @@ def _parse_sections_config(tool_config: dict[str, Any]) -> list[SectionConfig]:
|
|
|
506
506
|
# Validate and sort sections
|
|
507
507
|
if sections_config:
|
|
508
508
|
_validate_config_order(config_sections=sections_config)
|
|
509
|
-
sections_config.sort(key=lambda x: x.order)
|
|
509
|
+
sections_config.sort(key=lambda x: x.order if x.order is not None else float("inf"))
|
|
510
510
|
else:
|
|
511
511
|
sections_config = DEFAULT_SECTIONS
|
|
512
512
|
|
|
@@ -1497,7 +1497,10 @@ class DocstringChecker:
|
|
|
1497
1497
|
"""
|
|
1498
1498
|
section_patterns: list[tuple[str, str]] = []
|
|
1499
1499
|
# Sort sections that have an order, then append those that don't
|
|
1500
|
-
ordered_sections = sorted(
|
|
1500
|
+
ordered_sections = sorted(
|
|
1501
|
+
[s for s in self.sections_config if s.order is not None],
|
|
1502
|
+
key=lambda x: x.order if x.order is not None else 0,
|
|
1503
|
+
)
|
|
1501
1504
|
unordered_sections: list[SectionConfig] = [s for s in self.sections_config if s.order is None]
|
|
1502
1505
|
|
|
1503
1506
|
for section in ordered_sections + unordered_sections:
|
|
@@ -1570,7 +1573,10 @@ class DocstringChecker:
|
|
|
1570
1573
|
"""
|
|
1571
1574
|
expected_order: list[str] = [
|
|
1572
1575
|
s.name.title()
|
|
1573
|
-
for s in sorted(
|
|
1576
|
+
for s in sorted(
|
|
1577
|
+
[s for s in self.sections_config if s.order is not None],
|
|
1578
|
+
key=lambda x: x.order if x.order is not None else 0,
|
|
1579
|
+
)
|
|
1574
1580
|
]
|
|
1575
1581
|
expected_order.extend(
|
|
1576
1582
|
[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|