Skip to content

Commit d6dd5c0

Browse files
Use imperative mood in constructor docstrings. (#103)
* Use imperative mood in constructor docstrings. Fixes D401 in pycodestyle 5.0.0 and flake8. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstring. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstrings. Signed-off-by: Steven! Ragnarök <[email protected]>
1 parent b2e2a01 commit d6dd5c0

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

launch_ros/examples/lifecycle_pub_sub_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
def main(argv=sys.argv[1:]):
35-
"""Main."""
35+
"""Run lifecycle nodes via launch."""
3636
ld = launch.LaunchDescription()
3737

3838
# Prepare the talker node.

launch_ros/examples/pub_sub_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def main(argv=sys.argv[1:]):
31-
"""Main."""
31+
"""Run demo nodes via launch."""
3232
ld = LaunchDescription([
3333
launch_ros.actions.Node(
3434
package='demo_nodes_cpp', node_executable='talker', output='screen',

launch_ros/launch_ros/actions/push_ros_namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
namespace: SomeSubstitutionsType,
4545
**kwargs
4646
) -> None:
47-
"""Constructor."""
47+
"""Create a PushRosNamespace action."""
4848
super().__init__(**kwargs)
4949
self.__namespace = normalize_to_list_of_substitutions(namespace)
5050

launch_ros/launch_ros/default_launch_description.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ROSSpecificLaunchStartup(launch.actions.OpaqueFunction):
2929
"""Does ROS specific launch startup."""
3030

3131
def __init__(self, rclpy_context=None):
32-
"""Constructor."""
32+
"""Create a ROSSpecificLaunchStartup opaque function."""
3333
super().__init__(function=self._function)
3434
self.__shutting_down = False
3535
self.__rclpy_context = rclpy_context

launch_ros/launch_ros/event_handlers/on_state_transition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
**kwargs
4343
) -> None:
4444
"""
45-
Constructor.
45+
Create an OnStateTransition event handler.
4646
4747
There are several matching options, each of which is compared with the
4848
event and must match it to have the handler handle the event.

launch_ros/launch_ros/events/lifecycle/change_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
transition_id: int
7272
) -> None:
7373
"""
74-
Constructor.
74+
Create a ChangeState event.
7575
7676
:param: lifecycle_node_matcher is a callable which returns True if the
7777
given lifecycle node should be affected by this event.

launch_ros/launch_ros/events/lifecycle/state_transition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(
3737
msg: lifecycle_msgs.msg.TransitionEvent
3838
) -> None:
3939
"""
40-
Constructor.
40+
Create a StateTransition event.
4141
4242
:param: action the instance of class::`LifecycleNode` that generated this event
4343
:param: msg the instance of the ROS message TransitionEvent that generated this event

launch_ros/launch_ros/substitutions/executable_in_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ExecutableInPackage(FindPackagePrefix):
4646
"""
4747

4848
def __init__(self, executable: SomeSubstitutionsType, package: SomeSubstitutionsType) -> None:
49-
"""Constructor."""
49+
"""Create an ExecutableInPackage substitution."""
5050
super().__init__(package)
5151
self.__executable = normalize_to_list_of_substitutions(executable)
5252

launch_ros/launch_ros/substitutions/find_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(
4040
self,
4141
package: SomeSubstitutionsType,
4242
) -> None:
43-
"""Constructor."""
43+
"""Create a FindPackage substitution."""
4444
super().__init__()
4545
self.__package = normalize_to_list_of_substitutions(package)
4646

ros2launch/ros2launch/api/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MultipleLaunchFilesError(Exception):
3434
"""Exception raised when multiple candidate launch files are found in a package."""
3535

3636
def __init__(self, msg, paths):
37-
"""Constructor."""
37+
"""Create a MultipleLaunchFilesError."""
3838
super().__init__(msg)
3939
self.paths = paths
4040

@@ -168,7 +168,7 @@ class LaunchFileNameCompleter:
168168
"""Callable returning a list of launch file names within a package's share directory."""
169169

170170
def __init__(self, *, package_name_key=None):
171-
"""Constructor."""
171+
"""Create LaunchFileNameCompleter."""
172172
self.package_name_key = 'package_name' if package_name_key is None else package_name_key
173173

174174
def __call__(self, prefix, parsed_args, **kwargs):

0 commit comments

Comments
 (0)