(
    manifest: Manifest, current_project: str, exposure: ParsedExposure
)
Given a manifest and a exposure in that manifest, process its refs
Given a manifest and a exposure in that manifest, process its refs
Given a manifest and a exposure in that manifest process its refs
def _process_refs_for_exposure(
    manifest: Manifest, current_project: str, exposure: ParsedExposure
):
    """Given a manifest and a exposure in that manifest, process its refs"""
    for ref in exposure.refs:
        target_model: Optional[Union[Disabled, ManifestNode]] = None
        target_model_name: str
        target_model_package: Optional[str] = None

        if len(ref) == 1:
            target_model_name = ref[0]
        elif len(ref) == 2:
            target_model_package, target_model_name = ref
        else:
            raise dbt.exceptions.InternalException(
                f'Refs should always be 1 or 2 arguments - got {len(ref)}'
            )

        target_model = manifest.resolve_ref(
            target_model_name,
            target_model_package,
            current_project,
            exposure.package_name,
        )

        if target_model is None or isinstance(target_model, Disabled):
            # This may raise. Even if it doesn't, we don't want to add
            # this exposure to the graph b/c there is no destination exposure
            invalid_ref_fail_unless_test(
                exposure, target_model_name, target_model_package,
                disabled=(isinstance(target_model, Disabled))
            )

            continue

        target_model_id = target_model.unique_id

        exposure.depends_on.nodes.append(target_model_id)
        manifest.update_exposure(exposure)
def _process_refs_for_exposure ( manifest : Manifest , current_project : str , exposure : ParsedExposure ) : for ref in exposure . refs : target_model : Optional [ Union [ Disabled , ManifestNode ] ] = None target_model_name : str target_model_package : Optional [ str ] = None if len ( ref ) == 1 : target_model_name = ref [ 0 ] elif len ( ref ) == 2 : target_model_package , target_model_name = ref else : raise dbt . exceptions . InternalException ( f'Refs should always be 1 or 2 arguments - got {len(ref)}' ) target_model = manifest . resolve_ref ( target_model_name , target_model_package , current_project , exposure . package_name , ) if target_model is None or isinstance ( target_model , Disabled ) : # This may raise. Even if it doesn't, we don't want to add # this exposure to the graph b/c there is no destination exposure invalid_ref_fail_unless_test ( exposure , target_model_name , target_model_package , disabled = ( isinstance ( target_model , Disabled ) ) ) continue target_model_id = target_model . unique_id exposure . depends_on . nodes . append ( target_model_id ) manifest . update_exposure ( exposure )