(
tree: Iterable[Mapping[str, Any]], change_type_order: list[str]
)
| 199 | |
| 200 | |
| 201 | def generate_ordered_changelog_tree( |
| 202 | tree: Iterable[Mapping[str, Any]], change_type_order: list[str] |
| 203 | ) -> Generator[dict[str, Any], None, None]: |
| 204 | if len(set(change_type_order)) != len(change_type_order): |
| 205 | raise InvalidConfigurationError( |
| 206 | f"Change types contain duplicated types ({change_type_order})" |
| 207 | ) |
| 208 | |
| 209 | for entry in tree: |
| 210 | yield { |
| 211 | **entry, |
| 212 | "changes": _calculate_sorted_changes(change_type_order, entry["changes"]), |
| 213 | } |
| 214 | |
| 215 | |
| 216 | def _calculate_sorted_changes( |
nothing calls this directly
no test coverage detected
searching dependent graphs…