Use imperative mood in constructor docstrings
This commit is contained in:
parent
bdac887d5f
commit
dadc355b06
11 changed files with 15 additions and 13 deletions
|
@ -27,7 +27,7 @@ class CpuTimeDataModel(DataModel):
|
|||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Constructor."""
|
||||
"""Create a CpuTimeDataModel."""
|
||||
super().__init__()
|
||||
self.times = pd.DataFrame(columns=[
|
||||
'tid',
|
||||
|
|
|
@ -28,7 +28,7 @@ class ProfileDataModel(DataModel):
|
|||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Constructor."""
|
||||
"""Create a ProfileDataModel."""
|
||||
super().__init__()
|
||||
self.times = pd.DataFrame(columns=[
|
||||
'tid',
|
||||
|
|
|
@ -27,7 +27,7 @@ class Ros2DataModel(DataModel):
|
|||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Constructor."""
|
||||
"""Create a Ros2DataModel."""
|
||||
super().__init__()
|
||||
# Objects (one-time events, usually when something is created)
|
||||
self.contexts = pd.DataFrame(columns=['context_handle',
|
||||
|
|
|
@ -40,7 +40,7 @@ class EventMetadata():
|
|||
tid: int = None,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create an EventMetadata.
|
||||
|
||||
Parameters with a default value of `None` are not mandatory,
|
||||
since they are not always present.
|
||||
|
@ -115,7 +115,7 @@ class EventHandler(Dependant):
|
|||
**kwargs,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create an EventHandler.
|
||||
|
||||
TODO make subclasses pass on their *DataModel to this class
|
||||
|
||||
|
@ -173,7 +173,7 @@ class DependencySolver():
|
|||
**kwargs,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a DependencySolver.
|
||||
|
||||
:param initial_dependants: the initial dependant instances, in order
|
||||
:param kwargs: the parameters to pass on to new instances
|
||||
|
@ -251,7 +251,7 @@ class Processor():
|
|||
**kwargs,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a Processor.
|
||||
|
||||
:param handlers: the `EventHandler`s to use for processing
|
||||
:param kwargs: the parameters to pass on to new handlers
|
||||
|
@ -368,7 +368,7 @@ class ProcessingProgressDisplay():
|
|||
processing_elements: List[str],
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a ProcessingProgressDisplay.
|
||||
|
||||
:param processing_elements: the list of elements doing processing
|
||||
"""
|
||||
|
|
|
@ -34,6 +34,7 @@ class CpuTimeHandler(EventHandler):
|
|||
self,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
"""Create a CpuTimeHandler."""
|
||||
# Link event to handling method
|
||||
handler_map = {
|
||||
'sched_switch':
|
||||
|
|
|
@ -47,7 +47,7 @@ class ProfileHandler(EventHandler):
|
|||
**kwargs,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a ProfileHandler.
|
||||
|
||||
:param address_to_func: the mapping from function address (`int` or hex `str`) to name
|
||||
"""
|
||||
|
|
|
@ -34,6 +34,7 @@ class Ros2Handler(EventHandler):
|
|||
self,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
"""Create a Ros2Handler."""
|
||||
# Link a ROS trace event to its corresponding handling method
|
||||
handler_map = {
|
||||
'ros2:rcl_init':
|
||||
|
|
|
@ -35,7 +35,7 @@ class DataModelUtil():
|
|||
data_model: DataModel,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a DataModelUtil.
|
||||
|
||||
:param data_model: the data model
|
||||
"""
|
||||
|
|
|
@ -28,7 +28,7 @@ class CpuTimeDataModelUtil(DataModelUtil):
|
|||
data_model: CpuTimeDataModel,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a CpuTimeDataModelUtil.
|
||||
|
||||
:param data_model: the data model object to use
|
||||
"""
|
||||
|
|
|
@ -34,7 +34,7 @@ class ProfileDataModelUtil(DataModelUtil):
|
|||
data_model: ProfileDataModel,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a ProfileDataModelUtil.
|
||||
|
||||
:param data_model: the data model object to use
|
||||
"""
|
||||
|
|
|
@ -34,7 +34,7 @@ class Ros2DataModelUtil(DataModelUtil):
|
|||
data_model: Ros2DataModel,
|
||||
) -> None:
|
||||
"""
|
||||
Constructor.
|
||||
Create a Ros2DataModelUtil.
|
||||
|
||||
:param data_model: the data model object to use
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue