reno.utils.is_ref_in_parent_scope#
- reno.utils.is_ref_in_parent_scope(ref, source)#
Check if a reference is in the scope _above_ some source reference. (In other words, in the source model’s parent, or parent of that parent, up the chain, anything except the same model as source)
This is primarily used in the diagramming logic to determine which model/submodel needs to handle rendering a particular reference.
- Parameters:
ref (reno.components.TrackedReference) – The reference to look for in parent scopes.
source (reno.components.TrackedReference) – The reference to search the parent chain through.
- Returns:
Trueif a ref is somewhere in the source’s parent chain (and notably _not_ in the same exact model)- Return type:
bool