D417: fix
This commit is contained in:
@@ -28,6 +28,7 @@ def find_dataclasses_in_directory(
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
directory (str): The root directory to start searching from.
|
directory (str): The root directory to start searching from.
|
||||||
|
exclude_paths: Optional list of paths to exclude from the search.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List[Tuple[str, str]]: A list of tuples containing the file path and the dataclass name.
|
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:
|
Args:
|
||||||
file_path (str): Path to the file.
|
file_path (str): Path to the file.
|
||||||
class_name (str): Name of the class to load.
|
class_name (str): Name of the class to load.
|
||||||
|
root_dir: The root directory for module path resolution.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List[Type]: The dataclass type if found, else an empty list.
|
List[Type]: The dataclass type if found, else an empty list.
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ class Generator:
|
|||||||
Args:
|
Args:
|
||||||
machine_name (str): The name of the machine.
|
machine_name (str): The name of the machine.
|
||||||
flake (Flake): The flake to get the generators from.
|
flake (Flake): The flake to get the generators from.
|
||||||
|
include_previous_values: Whether to include previous values in the generators.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
list[Generator]: A list of (unsorted) generators for the machine.
|
list[Generator]: A list of (unsorted) generators for the machine.
|
||||||
|
|||||||
@@ -113,16 +113,22 @@ def extract_frontmatter[T](
|
|||||||
|
|
||||||
Parameters
|
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
|
Returns
|
||||||
-------
|
-------
|
||||||
- str: The extracted frontmatter as a string.
|
tuple[T, str]
|
||||||
- str: The content of the README file without the frontmatter.
|
The extracted frontmatter object and the content without frontmatter.
|
||||||
|
|
||||||
Raises
|
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)
|
frontmatter_raw, remaining_content = parse_frontmatter(readme_content)
|
||||||
|
|||||||
Reference in New Issue
Block a user