Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 630efad5 authored by eckhart's avatar eckhart
Browse files

- transformation.py: doc strings adjusted

parent 48920684
...@@ -311,7 +311,7 @@ def single_child(context: List[Node]) -> bool: ...@@ -311,7 +311,7 @@ def single_child(context: List[Node]) -> bool:
@transformation_factory(int, str, Callable) @transformation_factory(int, str, Callable)
def replace_by_child(context: List[Node], criteria: CriteriaType=single_child): def replace_by_child(context: List[Node], criteria: CriteriaType=single_child):
""" """
Replace a node by the first of its immediate descendants Replaces a node by the first of its immediate descendants
that meets the `criteria`. The criteria can either be the that meets the `criteria`. The criteria can either be the
index of the child (counting from zero), or the tag name or index of the child (counting from zero), or the tag name or
a boolean-valued function on the context of the child. a boolean-valued function on the context of the child.
...@@ -328,7 +328,7 @@ def replace_by_child(context: List[Node], criteria: CriteriaType=single_child): ...@@ -328,7 +328,7 @@ def replace_by_child(context: List[Node], criteria: CriteriaType=single_child):
@transformation_factory(int, str, Callable) @transformation_factory(int, str, Callable)
def content_from_child(context: List[None], criteria: CriteriaType=single_child): def content_from_child(context: List[None], criteria: CriteriaType=single_child):
""" """
Reduce a node, by transferring the result of the first of its Reduces a node, by transferring the result of the first of its
immediate descendants that meets the `criteria` to this node, immediate descendants that meets the `criteria` to this node,
but keeping this node's parser entry. The criteria can either but keeping this node's parser entry. The criteria can either
be the index of the child (counting from zero), or the tag be the index of the child (counting from zero), or the tag
...@@ -346,8 +346,9 @@ def content_from_child(context: List[None], criteria: CriteriaType=single_child) ...@@ -346,8 +346,9 @@ def content_from_child(context: List[None], criteria: CriteriaType=single_child)
def replace_by_single_child(context: List[Node]): def replace_by_single_child(context: List[Node]):
""" """
Remove single branch node, replacing it by its immediate descendant. Removes single branch node, replacing it by its immediate descendant.
If there are more than one children, no replacement takes place. Replacement only takes place, if the last node in the context has
exactly one child.
""" """
node = context[-1] node = context[-1]
if len(node.children) == 1: if len(node.children) == 1:
...@@ -356,10 +357,10 @@ def replace_by_single_child(context: List[Node]): ...@@ -356,10 +357,10 @@ def replace_by_single_child(context: List[Node]):
def content_from_sinlge_child(context: List[Node]): def content_from_sinlge_child(context: List[Node]):
""" """
Reduce a single branch node by transferring the result of its Reduces a single branch node by transferring the result of its
immediate descendant to this node, but keeping this node's parser entry. immediate descendant to this node, but keeping this node's parser entry.
This will only be done if the last node in the context has is exactly Reduction only takes place if the last node in the context has
one child. exactly one child.
""" """
node = context[-1] node = context[-1]
if len(node.children) == 1: if len(node.children) == 1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment