|
9 | 9 | .md-nav--secondary .md-nav__list .md-nav__list { display: none; } |
10 | 10 | </style> |
11 | 11 |
|
| 12 | +!!! info "v1.11.1" |
| 13 | + |
| 14 | + ## **v1.11.1 - Static Type Checking and Robust Sorting** |
| 15 | + |
| 16 | + <!-- md:tag v1.11.1 --><br> |
| 17 | + <!-- md:date 2026-01-04 --><br> |
| 18 | + <!-- md:link [data-science-extensions/docstring-format-checker/releases/v1.11.1](https://github.com/data-science-extensions/docstring-format-checker/releases/tag/v1.11.1) --> |
| 19 | + |
| 20 | + ??? note "Release Notes" |
| 21 | + |
| 22 | + ### 📃 Overview |
| 23 | + |
| 24 | + Introduce static type checking with Pyright and refine the section sorting logic to improve the robustness and reliability of the docstring validation process. This release also enhances the test suite with more explicit assertions and optimises the development workflow. |
| 25 | + |
| 26 | + |
| 27 | + ### ✨ New Features |
| 28 | + |
| 29 | + |
| 30 | + #### 🔍 Integrate Pyright Static Analysis |
| 31 | + |
| 32 | + Integrate `pyright` into the development workflow to ensure strict type safety across the codebase. |
| 33 | + |
| 34 | + - Add `pyright` to the `dev` dependency group in `pyproject.toml`. |
| 35 | + - Implement the `check_pyright()` function in `src/utils/scripts.py` to perform automated static analysis. |
| 36 | + - Update the `check()` function to include Pyright validation as a standard step in the project's quality assurance process. |
| 37 | + |
| 38 | + |
| 39 | + ### 🐛 Bug Fixes |
| 40 | + |
| 41 | + |
| 42 | + #### ⚙️ Refine Section Sorting Logic |
| 43 | + |
| 44 | + Improve the robustness of the section sorting mechanism when handling optional order values. |
| 45 | + |
| 46 | + - Update the `_parse_sections_config()` function in `config.py` to handle `None` values for section orders by defaulting to `float("inf")`. This ensures that unordered sections are consistently placed at the end of the sequence. |
| 47 | + - Standardise the sorting logic within the `._build_section_patterns()` and `._build_expected_section_order()` methods in the `DocstringChecker()` class to handle optional orders gracefully. |
| 48 | + |
| 49 | + |
| 50 | + ### ⚙️ Technical Improvements |
| 51 | + |
| 52 | + |
| 53 | + #### 🧪 Enhance Test Assertions |
| 54 | + |
| 55 | + Strengthen the test suite by introducing more explicit assertions and type validations. |
| 56 | + |
| 57 | + - Add assertions to verify that `func_node` is an instance of the `ast.FunctionDef()` or `ast.AsyncFunctionDef()` class in various test cases. |
| 58 | + - Update the `TestParameterMismatch()` class to verify that `docstring` and `error_message` are not `None` before performing string operations, resolving potential type errors and improving test reliability. |
| 59 | + |
| 60 | + |
| 61 | + #### 🧹 Optimise Validation Workflow |
| 62 | + |
| 63 | + Refine the project's validation script and repository maintenance. |
| 64 | + |
| 65 | + - Reorder the `check()` function in `scripts.py` to execute `check_mkdocs()` after `check_build()`, ensuring that the documentation build is verified after the package build. |
| 66 | + - Update the `.gitignore` file to include the `.complexipy_cache/*` pattern, preventing local cache artefacts from being tracked. |
| 67 | + |
| 68 | + |
| 69 | + ### 💪 Pull Requests |
| 70 | + |
| 71 | + * Integrate Pyright and Refine Section Sorting Logic by @chrimaho in https://github.com/data-science-extensions/docstring-format-checker/pull/36 |
| 72 | + |
| 73 | + |
| 74 | + **Full Changelog**: https://github.com/data-science-extensions/docstring-format-checker/compare/v1.11.0...v1.11.1 |
| 75 | + |
| 76 | + ??? abstract "Updates" |
| 77 | + |
| 78 | + * [`e8f526e`](https://github.com/data-science-extensions/docstring-format-checker/commit/e8f526ef15933fa6f2121c8d3c464f38bab8f250): Refine section sorting and enhance test assertions<br> |
| 79 | + - Update sorting logic in `_parse_sections_config()` function to handle `None` values by defaulting to `float("inf")`<br> |
| 80 | + - Standardise section sorting within `._get_section_patterns()` and `._get_expected_section_order()` methods in `DocstringChecker()` class<br> |
| 81 | + - Add assertions to verify `func_node` is an `ast.FunctionDef()` or `ast.AsyncFunctionDef()` class in test suites<br> |
| 82 | + - Verify `docstring` and `error_message` are not `None` in `TestParameterMismatch()` class to improve type safety<br> |
| 83 | + - Resolve PyRight errors |
| 84 | + (by [chrimaho](https://github.com/chrimaho)) |
| 85 | + * [`b9ae1da`](https://github.com/data-science-extensions/docstring-format-checker/commit/b9ae1da6c42bc69a45f4eb8b50934ee63fade27a): Clean up and reorder validation sequence<br> |
| 86 | + - Remove commented-out reference to the `check_mypy()` function<br> |
| 87 | + - Reorder the `check_mkdocs()` function to execute after the `check_build()` function |
| 88 | + (by [chrimaho](https://github.com/chrimaho)) |
| 89 | + * [`2ce144d`](https://github.com/data-science-extensions/docstring-format-checker/commit/2ce144d8737e12cfd99d90c78d2086e9c315f138): Add Pyright for static type checking<br> |
| 90 | + - Add `pyright` to the `dev` dependency group in `pyproject.toml`<br> |
| 91 | + - Define the `check_pyright()` function to execute code analysis<br> |
| 92 | + - Update the `check()` function to call the `check_pyright()` function and standardise the validation process |
| 93 | + (by [chrimaho](https://github.com/chrimaho)) |
| 94 | + * [`da037b4`](https://github.com/data-science-extensions/docstring-format-checker/commit/da037b43b7c5d8ae03c0400d3239de0955d5239b): Ignore complexipy cache directory<br> |
| 95 | + - Add the `.complexipy_cache/*` pattern to the `.gitignore` file to ensure local cache artefacts are not tracked in the repository. |
| 96 | + (by [chrimaho](https://github.com/chrimaho)) |
| 97 | + |
| 98 | + |
12 | 99 | !!! info "v1.11.0" |
13 | 100 |
|
14 | 101 | ## **v1.11.0 - Flexible Section Ordering and Multi-word Headers** |
|
0 commit comments