DanglerMatch
class samplomatic.pre_samplex.DanglerMatch(direction: Direction | None = None, node_types: tuple[type[PreNode], ...] | None = None, dangler_type: DanglerType | None = None)
Bases: object
A helper class to specify conditions on danglers.
Attributes Summary
Column 1 | Column 2 |
|---|---|
dangler_type | The desired type of dangler. |
direction | The desired direction of the node. |
node_types | The desired type of the node. |
Methods Summary
Column 1 | Column 2 |
|---|---|
match_node(node) | Check if a node matches the conditions specified in the object |
Attributes Documentation
dangler_type
Type: DanglerType | None
Default value: None
The desired type of dangler.
Set to None to get both required and optional danglers.
direction
Default value: None
The desired direction of the node.
Set to None to get all node directions. Note that setting to BOTH will only match nodes with BOTH direction.
node_types
Type: tuple[type[PreNode], ...] | None
Default value: None
The desired type of the node.
Set to None to get all node types.
Methods Documentation
match_node
match_node(node: PreNode) → bool
Check if a node matches the conditions specified in the object