class TestIter(bt2._UserMessageIterator):
def __init__(self, config, output_port):
class TestIter(bt2._UserMessageIterator):
def __init__(self, config, output_port):
- if params['what'] == 'test-params':
- items = sorted([str(x) for x in params.items() if x[0].startswith('test-')])
- stream_name = '{}: {}'.format(comp_cls_name, ', '.join(items))
- elif params['what'] == 'log-level':
+ if params["what"] == "test-params":
+ items = sorted([str(x) for x in params.items() if x[0].startswith("test-")])
+ stream_name = "{}: {}".format(comp_cls_name, ", ".join(items))
+ elif params["what"] == "log-level":
- stream_name = '{}: {}'.format(comp_cls_name, log_level)
- elif params['what'] == 'python-obj':
+ stream_name = "{}: {}".format(comp_cls_name, log_level)
+ elif params["what"] == "python-obj":
- self._add_output_port('out', {'params': params, 'obj': obj, 'sc': sc})
+ self._add_output_port("out", {"params": params, "obj": obj, "sc": sc})
def _user_query(priv_query_exec, obj, params, method_obj):
# Match files starting with 'aaa'.
def _user_query(priv_query_exec, obj, params, method_obj):
# Match files starting with 'aaa'.
- if name.startswith('aaa'):
- return {'weight': 1, 'group': 'aaa'}
+ if name.startswith("aaa"):
+ return {"weight": 1, "group": "aaa"}
def _user_query(priv_query_exec, obj, params, method_obj):
# Match files starting with 'bbb'.
def _user_query(priv_query_exec, obj, params, method_obj):
# Match files starting with 'bbb'.
- if name.startswith('bbb'):
- return {'weight': 1, 'group': 'bbb'}
+ if name.startswith("bbb"):
+ return {"weight": 1, "group": "bbb"}