diff --git a/pkgs/clan-cli/clan_cli/tests/test_api_dataclass_compat.py b/pkgs/clan-cli/clan_cli/tests/test_api_dataclass_compat.py index 406b9b712..5e32eb1ec 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_api_dataclass_compat.py +++ b/pkgs/clan-cli/clan_cli/tests/test_api_dataclass_compat.py @@ -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. diff --git a/pkgs/clan-cli/clan_cli/vars/generator.py b/pkgs/clan-cli/clan_cli/vars/generator.py index 30eeb7176..a8c95aace 100644 --- a/pkgs/clan-cli/clan_cli/vars/generator.py +++ b/pkgs/clan-cli/clan_cli/vars/generator.py @@ -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. diff --git a/pkgs/clan-cli/clan_lib/services/modules.py b/pkgs/clan-cli/clan_lib/services/modules.py index f69917bb6..6120d945b 100644 --- a/pkgs/clan-cli/clan_lib/services/modules.py +++ b/pkgs/clan-cli/clan_lib/services/modules.py @@ -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)