Skip to content

v1.11.0 - Flexible Section Ordering and Multi-word Headers

Choose a tag to compare

@chrimaho chrimaho released this 04 Jan 03:08
· 122 commits to main since this release

πŸ“ƒ Overview

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.

✨ New Features

πŸ”“ Support Unordered Sections

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.

πŸ“ Support Multi-word Section Headers

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.

πŸ› Bug Fixes

πŸ› Fix Multi-word Section Validation

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.

πŸ› οΈ Fix Test Suite Syntax Error

Correct a SyntaxError in the test helper _check_docstring() caused by improper indentation of generated Python content.

βš™οΈ Technical Improvements

πŸ§ͺ Expand Test Coverage

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.

πŸ“– Update Documentation

Update the README.md to include details and examples for the new flexible section ordering feature.

πŸ’ͺ Pull Requests

  • Support Unordered Docstring Sections and Multi-word Names by @chrimaho in #35

Full Changelog: v1.10.1...v1.11.0