Chromium Code Reviews| Index: recipe_engine/post_process.py |
| diff --git a/recipe_engine/post_process.py b/recipe_engine/post_process.py |
| index 1d3a0b6c75ecd320e8af7651e2a0d174675a5bd1..f5ca49e5a9eebe4db96991ef67860350a3b79b3e 100644 |
| --- a/recipe_engine/post_process.py |
| +++ b/recipe_engine/post_process.py |
| @@ -11,10 +11,12 @@ import re |
| from collections import defaultdict, OrderedDict, namedtuple |
| +_reEntry = namedtuple('_reEntry', 'at_most at_least fields') |
|
iannucci
2017/02/28 23:22:59
can we rename this to _filterRegexEntry now that i
Paweł Hajdan Jr.
2017/03/07 19:03:35
Done.
|
| + |
| + |
| class Filter(object): |
| """Filter is an implementation of a post_process callable which can remove |
| unwanted data from a step OrderedDict.""" |
| - _reEntry = namedtuple('_reEntry', 'at_most at_least fields') |
| def __init__(self, *steps): |
| """Builds a new Filter object. It may be optionally prepopulated by |
| @@ -109,7 +111,7 @@ class Filter(object): |
| if isinstance(fields, basestring): |
| raise ValueError('Expected fields to be a non-string iterable') |
| new_re_data = self.re_data.copy() |
| - new_re_data[re.compile(step_name_re)] = Filter._reEntry( |
| + new_re_data[re.compile(step_name_re)] = _reEntry( |
| at_least, at_most, frozenset(fields)) |
| ret = Filter() |