Skip to content

Commit 5a089e7

Browse files
Update changelog to v1.11.0 [skip ci]
1 parent e49ac4c commit 5a089e7

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,90 @@
99
.md-nav--secondary .md-nav__list .md-nav__list { display: none; }
1010
</style>
1111

12+
!!! info "v1.11.0"
13+
14+
## **v1.11.0 - Flexible Section Ordering and Multi-word Headers**
15+
16+
<!-- md:tag v1.11.0 --><br>
17+
<!-- md:date 2026-01-04 --><br>
18+
<!-- md:link [data-science-extensions/docstring-format-checker/releases/v1.11.0](https://github.com/data-science-extensions/docstring-format-checker/releases/tag/v1.11.0) -->
19+
20+
??? note "Release Notes"
21+
22+
### 📃 Overview
23+
24+
Introduce support for unordered docstring sections and multi-word section headers to provide greater flexibility in docstring formatting. This release also includes bug fixes for section name validation and improvements to the test suite.
25+
26+
27+
### ✨ New Features
28+
29+
30+
#### 🔓 Support Unordered Sections
31+
32+
Allow sections to be defined with `order = null` in the configuration. These sections can appear anywhere within a docstring without triggering sequence validation errors. This is particularly useful for sections like `Deprecation Warning` or `Note` that may appear at different positions depending on the context.
33+
34+
35+
#### 📝 Support Multi-word Section Headers
36+
37+
Update the section detection logic to support headers containing multiple words. This enables the use of descriptive section names such as `Custom List` or `Deprecation Warning` while maintaining strict validation of other rules like colon usage and title casing.
38+
39+
40+
### 🐛 Bug Fixes
41+
42+
43+
#### 🐛 Fix Multi-word Section Validation
44+
45+
Resolve an issue where multi-word section names were incorrectly triggering "requires parenthesized types" errors. The validation regex now correctly handles spaces within section headers.
46+
47+
48+
#### 🛠️ Fix Test Suite Syntax Error
49+
50+
Correct a `SyntaxError` in the test helper `_check_docstring()` caused by improper indentation of generated Python content.
51+
52+
53+
### ⚙️ Technical Improvements
54+
55+
56+
#### 🧪 Expand Test Coverage
57+
58+
Add a comprehensive suite of tests for unordered sections, covering various placements, case-insensitivity, and interaction with required sections. Maintain 100% code coverage across the entire project.
59+
60+
61+
#### 📖 Update Documentation
62+
63+
Update the `README.md` to include details and examples for the new flexible section ordering feature.
64+
65+
### 💪 Pull Requests
66+
67+
* Support Unordered Docstring Sections and Multi-word Names by @chrimaho in https://github.com/data-science-extensions/docstring-format-checker/pull/35
68+
69+
70+
**Full Changelog**: https://github.com/data-science-extensions/docstring-format-checker/compare/v1.10.1...v1.11.0
71+
72+
73+
??? abstract "Updates"
74+
75+
* [`b68e1d9`](https://github.com/data-science-extensions/docstring-format-checker/commit/b68e1d95eeb09b84d94a1f14f60b64ba29799ad1): Fix package URLs
76+
(by [chrimaho](https://github.com/chrimaho))
77+
* [`c9d8628`](https://github.com/data-science-extensions/docstring-format-checker/commit/c9d8628a6afedf6e2fa9ebf8870811c3bbe596c1): Remove redundant boolean checks from Unit Tests
78+
(by [chrimaho](https://github.com/chrimaho))
79+
* [`ab66c8a`](https://github.com/data-science-extensions/docstring-format-checker/commit/ab66c8a47496f3d511f919f8457a504251e55cb8): Fix typo
80+
(by [chrimaho](https://github.com/chrimaho))
81+
* [`976bdf6`](https://github.com/data-science-extensions/docstring-format-checker/commit/976bdf678b9b39e4930e348ef4a23f18f94b80ea): Update documentation for optional section ordering<br>
82+
- Enhance the `README.md` to reflect support for unordered "floating" sections.<br>
83+
- Explain that the `order` attribute is now optional to allow specific sections to appear anywhere.<br>
84+
- Provide additional TOML configuration examples to demonstrate different layout options for the `sections` list in `pyproject.toml`.
85+
(by [chrimaho](https://github.com/chrimaho))
86+
* [`1174a7e`](https://github.com/data-science-extensions/docstring-format-checker/commit/1174a7ea1b385d96670f205735af4fb84cb94883): Support unordered sections and multi-word names<br>
87+
- Allow the `order` attribute to be `None` in the `SectionConfig` class to support docstring sections that do not require a specific sequence.<br>
88+
- Update the `_validate_config_order()` function to ignore sections without an explicit order when checking for duplicate sequence values.<br>
89+
- Modify sorting logic in the `._get_section_patterns()` and `._get_expected_order()` methods to prioritise ordered sections while including unordered ones.<br>
90+
- Adjust regex patterns in the `DocstringChecker` class to recognise multi-word section names containing spaces.<br>
91+
- Ensure whitespace is stripped from matched section names in the `._is_section_header()` and `._get_section_config()` methods to facilitate more robust matching.<br>
92+
- Introduce unit tests in the `TestUnorderedSections` class to verify the parsing behaviour of docstrings with unordered sections.
93+
(by [chrimaho](https://github.com/chrimaho))
94+
95+
1296
!!! info "v1.10.1"
1397

1498
## **v1.10.1 - Standardise Dependencies and Modernise CI/CD Workflows**

0 commit comments

Comments
 (0)