launch.substitutions.boolean_substitution module

Module for boolean substitutions.

class launch.substitutions.boolean_substitution.AllSubstitution[source]

Bases: Substitution

Substitutes to the string ‘true’ if all of the input arguments evaluate to true.

If any of the arguments evaluates to false, then this substitution returns the string ‘false’.

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

Create an AllSubstitution substitution.

The following string arguments evaluate to true: ‘1’, ‘true’, ‘True’, ‘on’ The following string arguments evaluate to false: ‘0’, ‘false’, ‘False’, ‘off’

property args: List[List[Substitution]]

Getter for args.

describe() str[source]

Return a description of this substitution as a string.

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

Parse AllSubstitution substitution.

perform(context: LaunchContext) str[source]

Perform the substitution.

class launch.substitutions.boolean_substitution.AndSubstitution[source]

Bases: Substitution

Substitution that returns ‘and’ of the input boolean values.

__init__(left: str | Substitution | Iterable[str | Substitution], right: str | Substitution | Iterable[str | Substitution]) None[source]

Create an AndSubstitution substitution.

describe() str[source]

Return a description of this substitution as a string.

property left: List[Substitution]

Getter for left.

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

Parse AndSubstitution substitution.

perform(context: LaunchContext) str[source]

Perform the substitution.

property right: List[Substitution]

Getter for right.

class launch.substitutions.boolean_substitution.AnySubstitution[source]

Bases: Substitution

Substitutes to the string ‘true’ if at least one of the input arguments evaluates to true.

If none of the arguments evaluate to true, then this substitution returns the string ‘false’.

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

Create an AnySubstitution substitution.

The following string arguments evaluate to true: ‘1’, ‘true’, ‘True’, ‘on’

property args: List[List[Substitution]]

Getter for args.

describe() str[source]

Return a description of this substitution as a string.

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

Parse AnySubstitution substitution.

perform(context: LaunchContext) str[source]

Perform the substitution.

class launch.substitutions.boolean_substitution.NotSubstitution[source]

Bases: Substitution

Substitution that returns ‘not’ of the input boolean value.

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

Create a NotSubstitution substitution.

describe() str[source]

Return a description of this substitution as a string.

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

Parse NotSubstitution substitution.

perform(context: LaunchContext) str[source]

Perform the substitution.

property value: List[Substitution]

Getter for value.

class launch.substitutions.boolean_substitution.OrSubstitution[source]

Bases: Substitution

Substitution that returns ‘or’ of the input boolean values.

__init__(left: str | Substitution | Iterable[str | Substitution], right: str | Substitution | Iterable[str | Substitution]) None[source]

Create an OrSubstitution substitution.

describe() str[source]

Return a description of this substitution as a string.

property left: List[Substitution]

Getter for left.

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

Parse OrSubstitution substitution.

perform(context: LaunchContext) str[source]

Perform the substitution.

property right: List[Substitution]

Getter for right.