Skip to content

Commit

Permalink
[vscode] update extensions, set spell checking to UK
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed Sep 2, 2023
1 parent 6e97964 commit aaf9d1e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
"vscode": {
"extensions": [
"bierner.github-markdown-preview",
"bierner.markdown-preview-github-styles",
"bungcip.better-toml",
"streetsidesoftware.code-spell-checker",
"lextudio.restructuredtext",
"eamodio.gitlens",
"ms-python.python",
"omnilib.ufmt"
"omnilib.ufmt",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"tht13.rst-vscode"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"editor.defaultFormatter": "omnilib.ufmt",
"editor.formatOnSave": true
},
"cSpell.language": "en-GB",
"cSpell.words": [
"backported",
"behaviour",
Expand Down
27 changes: 27 additions & 0 deletions py_trees/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,3 +920,30 @@ def update(self) -> common.Status:
the behaviour's new status :class:`~py_trees.common.Status`
"""
return self.decorated.status


class PassThrough(Decorator):
"""
This decorator simply reflects the child's current status.
This behaviour is useful for debugging or visualisation purposes.
"""

def __init__(self, name: str, child: behaviour.Behaviour):
"""
Initialise with the standard decorator arguments.
Args:
name: the decorator name
child: the child to be decorated
"""
super(PassThrough, self).__init__(name=name, child=child)

def update(self) -> common.Status:
"""
Just reflect the child status.
Returns:
the behaviour's new status :class:`~py_trees.common.Status`
"""
return self.decorated.status

0 comments on commit aaf9d1e

Please sign in to comment.