launch.substitutions.anon_name module

Module for the anonymous name substitution.

class launch.substitutions.anon_name.AnonName[source]

Bases: Substitution

Generates an anonymous id based on name.

Name itself is a unique identifier: multiple uses of anon with the same parameter name will create the same “anonymized” name

__init__(name: str | Substitution | Iterable[str | Substitution]) None[source]

Construct an AnonName substitution.

compute_name(id_value: str) str[source]

Get anonymous name based on id value.

describe() str[source]

Return a description of this substitution as a string.

property name: List[Substitution]

Getter for name.

classmethod parse(data: Sequence[str | Substitution | Iterable[str | Substitution]])[source]

Parse AnonName substitution.

perform(context: LaunchContext) str[source]

Perform the substitution by creating/getting the anonymous name.