D417: fix

This commit is contained in:
Jörg Thalheim
2025-08-25 12:30:08 +02:00
parent ef5ab0c2f4
commit d9e6e0c540
3 changed files with 13 additions and 4 deletions

View File

@@ -113,16 +113,22 @@ def extract_frontmatter[T](
Parameters
----------
- readme_content (str): The content of the README file as a string.
readme_content : str
The content of the README file as a string.
err_scope : str
The error scope for error messages.
fm_class : type[T]
The class type to deserialize the frontmatter into.
Returns
-------
- str: The extracted frontmatter as a string.
- str: The content of the README file without the frontmatter.
tuple[T, str]
The extracted frontmatter object and the content without frontmatter.
Raises
------
- ValueError: If the README does not contain valid frontmatter.
ValueError
If the README does not contain valid frontmatter.
"""
frontmatter_raw, remaining_content = parse_frontmatter(readme_content)