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

Unified Diff: recipe_engine/post_process.py

Issue 2721613004: simulation_test_ng: initial CL (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | recipe_engine/simulation_test_ng.py » ('j') | recipe_engine/simulation_test_ng.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | recipe_engine/simulation_test_ng.py » ('j') | recipe_engine/simulation_test_ng.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698