D417: fix
This commit is contained in:
@@ -28,6 +28,7 @@ def find_dataclasses_in_directory(
|
||||
|
||||
Args:
|
||||
directory (str): The root directory to start searching from.
|
||||
exclude_paths: Optional list of paths to exclude from the search.
|
||||
|
||||
Returns:
|
||||
List[Tuple[str, str]]: A list of tuples containing the file path and the dataclass name.
|
||||
@@ -79,6 +80,7 @@ def load_dataclass_from_file(
|
||||
Args:
|
||||
file_path (str): Path to the file.
|
||||
class_name (str): Name of the class to load.
|
||||
root_dir: The root directory for module path resolution.
|
||||
|
||||
Returns:
|
||||
List[Type]: The dataclass type if found, else an empty list.
|
||||
|
||||
@@ -85,6 +85,7 @@ class Generator:
|
||||
Args:
|
||||
machine_name (str): The name of the machine.
|
||||
flake (Flake): The flake to get the generators from.
|
||||
include_previous_values: Whether to include previous values in the generators.
|
||||
|
||||
Returns:
|
||||
list[Generator]: A list of (unsorted) generators for the machine.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user