get_flat_dependant
Recursively flattens a dependency tree into a single Dependant object by aggregating parameters and OAuth scopes from all sub-dependencies. It manages circular or repeated dependencies using a cache key and tracks nested security scopes throughout the hierarchy.
def get_flat_dependant(
dependant: Dependant,
skip_repeats: bool = False,
visited: list[DependencyCacheKey] | None = None,
parent_oauth_scopes: list[str] | None = None
) - > Dependant
Flattens a dependency tree into a single Dependant object by recursively merging parameters and OAuth scopes from all sub-dependencies.
Parameters
| Name | Type | Description |
|---|---|---|
| dependant | Dependant | The root dependency object to begin flattening from. |
| skip_repeats | bool = False | If true, prevents the redundant processing of dependencies that have already been visited in the current tree. |
| visited | `list[DependencyCacheKey] | None` = None |
| parent_oauth_scopes | `list[str] | None` = None |
Returns
| Type | Description |
|---|---|
Dependant | A new Dependant instance containing the aggregated parameters and nested dependencies from the entire dependency graph. |