Make docstring style more consistent

This commit is contained in:
Ran Benita
2024-04-03 00:15:21 +03:00
parent e3b69d4f29
commit c01de1c73e
15 changed files with 64 additions and 71 deletions

View File

@@ -22,7 +22,7 @@ class WorkStealingScheduling:
test remains), an attempt is made to reassign ("steal") some tests from
other nodes to this node.
Attributes:
Attributes::
:numnodes: The expected number of nodes taking part. The actual
number of nodes will vary during the scheduler's lifetime as
@@ -101,7 +101,7 @@ class WorkStealingScheduling:
@property
def has_pending(self):
"""Return True if there are pending test items
"""Return True if there are pending test items.
This indicates that collection has finished and nodes are
still processing test items, so this can be thought of as
@@ -127,7 +127,7 @@ class WorkStealingScheduling:
self.node2pending[node] = []
def add_node_collection(self, node, collection):
"""Add the collected test items from a node
"""Add the collected test items from a node.
The collection is stored in the ``.node2collection`` map.
Called by the ``DSession.worker_collectionfinish`` hook.
@@ -148,7 +148,7 @@ class WorkStealingScheduling:
self.node2collection[node] = list(collection)
def mark_test_complete(self, node, item_index, duration=None):
"""Mark test item as completed by node
"""Mark test item as completed by node.
This is called by the ``DSession.worker_testreport`` hook.
"""
@@ -233,7 +233,7 @@ class WorkStealingScheduling:
self.steal_requested_from_node = steal_from.node
def remove_node(self, node):
"""Remove a node from the scheduler
"""Remove a node from the scheduler.
This should be called either when the node crashed or at
shutdown time. In the former case any pending items assigned
@@ -263,7 +263,7 @@ class WorkStealingScheduling:
return crashitem
def schedule(self):
"""Initiate distribution of the test collection
"""Initiate distribution of the test collection.
Initiate scheduling of the items across the nodes. If this
gets called again later it behaves the same as calling