Example #1
0
def target_factory(spec_string, target_concrete):
    spec = Spec(spec_string)

    if target_concrete:
        spec._mark_concrete()
        substitute_abstract_variants(spec)

    return spec
Example #2
0
def target_factory(spec_string, target_concrete):
    spec = Spec(spec_string)

    if target_concrete:
        spec._mark_concrete()
        substitute_abstract_variants(spec)

    return spec
Example #3
0
def make_spec(spec_like, concrete):
    if isinstance(spec_like, Spec):
        return spec_like

    spec = Spec(spec_like)
    if concrete:
        spec._mark_concrete()
        substitute_abstract_variants(spec)
    return spec