Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Delete unused args argument from main() in Python files

Open Beginner friendly
#467 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli, tooling

Research direction

The issue lists 30 Python files under rclpy/actions, rclpy/executors, rclpy/guard_conditions, rclpy/services, and rclpy/topics. In each file, locate the main() function definition and change its signature from def main(args=None): to def main():. Then find the call to rclpy.init(args=args) and change it to rclpy.init(). Run the examples to ensure they still start correctly.

Written by the indexing model from the issue text.

Description

good first issue

These files define main(args=None) and pass args to rclpy.init(args=args). However, nothing ever calls main() with an args argument, so this parameter does nothing.

Modify the following files to delete the args argument from main() (so the signature is def main():) and call rclpy.init() without passing args:

  • rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client.py
  • rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_asyncio.py
  • rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_cancel.py
  • rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_not_composable.py
  • rclpy/actions/minimal_action_server/examples_rclpy_minimal_action_server/server.py
  • rclpy/actions/minimal_action_server/examples_rclpy_minimal_action_server/server_defer.py
  • rclpy/actions/minimal_action_server/examples_rclpy_minimal_action_server/server_not_composable.py
  • rclpy/actions/minimal_action_server/examples_rclpy_minimal_action_server/server_queue_goals.py
  • rclpy/actions/minimal_action_server/examples_rclpy_minimal_action_server/server_single_goal.py
  • rclpy/executors/examples_rclpy_executors/callback_group.py
  • rclpy/executors/examples_rclpy_executors/composed.py
  • rclpy/executors/examples_rclpy_executors/custom_callback_group.py
  • rclpy/executors/examples_rclpy_executors/custom_executor.py
  • rclpy/executors/examples_rclpy_executors/listener.py
  • rclpy/executors/examples_rclpy_executors/talker.py
  • rclpy/guard_conditions/examples_rclpy_guard_conditions/trigger_guard_condition.py
  • rclpy/services/minimal_client/examples_rclpy_minimal_client/client.py
  • rclpy/services/minimal_client/examples_rclpy_minimal_client/client_async.py
  • rclpy/services/minimal_client/examples_rclpy_minimal_client/client_async_callback.py
  • rclpy/services/minimal_client/examples_rclpy_minimal_client/client_async_member_function.py
  • rclpy/services/minimal_service/examples_rclpy_minimal_service/service.py
  • rclpy/services/minimal_service/examples_rclpy_minimal_service/service_member_function.py
  • rclpy/topics/minimal_publisher/examples_rclpy_minimal_publisher/publisher_local_function.py
  • rclpy/topics/minimal_publisher/examples_rclpy_minimal_publisher/publisher_member_function.py
  • rclpy/topics/minimal_publisher/examples_rclpy_minimal_publisher/publisher_member_function_with_wait_for_all_acked.py
  • rclpy/topics/minimal_publisher/examples_rclpy_minimal_publisher/publisher_old_school.py
  • rclpy/topics/minimal_subscriber/examples_rclpy_minimal_subscriber/subscriber_lambda.py
  • rclpy/topics/minimal_subscriber/examples_rclpy_minimal_subscriber/subscriber_member_function.py
  • rclpy/topics/minimal_subscriber/examples_rclpy_minimal_subscriber/subscriber_old_school.py
  • rclpy/topics/pointcloud_publisher/examples_rclpy_pointcloud_publisher/pointcloud_publisher.py
Dominant language
C++
Stars
970
Forks
365
Avg merge
12d 20h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ros2/examples

All issues in ros2/examples

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.