Fix lint errors

This commit is contained in:
Christophe Bedard 2019-06-06 09:46:18 +02:00
parent 475dbbd107
commit 9b36c1513c
2 changed files with 11 additions and 3 deletions

View file

@ -3,9 +3,11 @@
import sys
from .lttng_models import EventMetadata, get_field, get_name
def ros_process(events):
"""
Process unpickled events and create ROS model
Process unpickled events and create ROS model.
:param events (list(dict(str:str:))): the list of events
:return the processor object
"""
@ -13,11 +15,14 @@ def ros_process(events):
processor.process_events(events)
return processor
class RosProcessor():
"""
ROS-aware event processing/handling class.
Handles a trace's events and builds a model with the data.
"""
def __init__(self):
# TODO add other stuff
# Instances of callback_start for eventual matching
@ -35,7 +40,8 @@ class RosProcessor():
def process_events(self, events):
"""
Process events
Process events.
:param events (list(dict(str:str))): the events to process
"""
for event in events:

View file

@ -13,7 +13,8 @@ _DISCARD = 'events_discarded'
def ctf_to_pickle(trace_directory, target):
"""
Load CTF trace and convert to a pickle file
Load CTF trace and convert to a pickle file.
:param trace_directory (str): the main/top trace directory
:param target (Pickler): the target pickle file to write to
"""
@ -50,6 +51,7 @@ def ctf_to_pickle(trace_directory, target):
def _ctf_event_to_pod(ctf_event):
"""
Convert name, timestamp, and all other keys except those in IGNORED_FIELDS into a dictionary.
:param ctf_element: The element to convert
:type ctf_element: babeltrace.Element
:return: