Chromium Code Reviews| Index: recipe_engine/util.py |
| diff --git a/recipe_engine/util.py b/recipe_engine/util.py |
| index 75cd5f9441f5b9eed881ef37bdf4ccedabcaa6e1..1bc3f4e54cfd6935288c60c188ce1e99d58e7575 100644 |
| --- a/recipe_engine/util.py |
| +++ b/recipe_engine/util.py |
| @@ -34,7 +34,7 @@ class ModuleInjectionSite(object): |
| class Placeholder(object): |
| - """Base class for json placeholders. Do not use directly.""" |
| + """Base class for command line argument placeholders. Do not use directly.""" |
| def __init__(self): |
| self.name_pieces = None |
| @@ -57,8 +57,6 @@ class Placeholder(object): |
| presentation (StepPresentation) - for the current step. |
| test (PlaceholderTestData) - test data for this placeholder. |
| - Returns value to add to step result. |
| - |
| May optionally modify presentation as a side-effect. |
| """ |
| pass |
| @@ -69,6 +67,22 @@ class Placeholder(object): |
| return "%s.%s" % self.name_pieces |
| +class InputPlaceholder(Placeholder): |
| + """Base class for json/raw_io input placeholders. Do not use directly.""" |
| + def result(self, presentation, test): |
| + """Returned value will be discarded.""" |
| + pass |
|
iannucci
2016/03/22 22:22:48
I think this method can be removed entirely, right
stgao
2016/03/22 23:19:17
Renaming sounds good to me. Done.
However, when p
|
| + result.__doc__ = Placeholder.result.__doc__ |
| + |
| + |
| +class OutputPlaceholder(Placeholder): |
| + """Base class for json/raw_io output placeholders. Do not use directly.""" |
| + def result(self, presentation, test): |
| + """Returned value will be added to the step result.""" |
| + pass |
| + result.__doc__ = Placeholder.result.__doc__ |
| + |
| + |
| def static_wraps(func): |
| wrapped_fn = func |
| if isinstance(func, staticmethod): |