Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: recipe_engine/post_process.py

Issue 2721613004: simulation_test_ng: initial CL (Closed)
Patch Set: revised Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: recipe_engine/post_process.py
diff --git a/recipe_engine/post_process.py b/recipe_engine/post_process.py
index 1d3a0b6c75ecd320e8af7651e2a0d174675a5bd1..9fb6f48d4be800462c3c6b34151e8efe2530ece1 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
+_filterRegexEntry = namedtuple('_filterRegexEntry', 'at_most at_least fields')
+
+
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)] = _filterRegexEntry(
at_least, at_most, frozenset(fields))
ret = Filter()
« no previous file with comments | « recipe_engine/loader.py ('k') | recipe_engine/simulation_test.py » ('j') | recipe_engine/test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698