From 9b73d06a59a3ee87bc4436fa87e85b64975ffb7c Mon Sep 17 00:00:00 2001 From: Florian Vahl Date: Fri, 20 Dec 2024 16:57:24 +0100 Subject: [PATCH] Add type checks for other python packages --- .../bitbots_blackboard/bitbots_blackboard/__init__.py | 4 ++++ .../bitbots_body_behavior/bitbots_body_behavior/__init__.py | 4 ++++ .../bitbots_body_behavior/behavior_dsd/actions/__init__.py | 6 ++++++ .../behavior_dsd/decisions/__init__.py | 6 ++++++ .../bitbots_tf_buffer/bitbots_tf_buffer/__init__.py | 5 +++++ bitbots_misc/bitbots_tts/bitbots_tts/__init__.py | 4 ++++ bitbots_misc/bitbots_utils/bitbots_utils/__init__.py | 4 ++++ bitbots_misc/system_monitor/system_monitor/__init__.py | 4 ++++ .../bitbots_animation_rqt/bitbots_animation_rqt/__init__.py | 4 ++++ bitbots_motion/bitbots_splines/bitbots_splines/__init__.py | 4 ++++ .../bitbots_localization_handler/__init__.py | 4 ++++ .../localization_dsd/actions/__init__.py | 6 ++++++ .../localization_dsd/decisions/__init__.py | 6 ++++++ .../bitbots_path_planning/bitbots_path_planning/__init__.py | 4 ++++ .../bitbots_webots_sim/bitbots_webots_sim/__init__.py | 4 ++++ .../bitbots_team_communication/__init__.py | 4 ++++ .../bitbots_team_data_sim_rqt/__init__.py | 4 ++++ bitbots_vision/bitbots_vision/__init__.py | 4 ++++ .../bitbots_ball_filter/bitbots_ball_filter/__init__.py | 4 ++++ .../bitbots_robot_filter/bitbots_robot_filter/__init__.py | 4 ++++ 20 files changed, 89 insertions(+) diff --git a/bitbots_behavior/bitbots_blackboard/bitbots_blackboard/__init__.py b/bitbots_behavior/bitbots_blackboard/bitbots_blackboard/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_behavior/bitbots_blackboard/bitbots_blackboard/__init__.py +++ b/bitbots_behavior/bitbots_blackboard/bitbots_blackboard/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/__init__.py b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/__init__.py +++ b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/__init__.py b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/__init__.py index e69de29bb..2b0d3a359 100644 --- a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/__init__.py +++ b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/__init__.py @@ -0,0 +1,6 @@ +# Setting up runtime type checking for this package +# We need to do this again here because the dsd imports +# the decisions and actions from this package in a standalone way +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/decisions/__init__.py b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/decisions/__init__.py index e69de29bb..2b0d3a359 100644 --- a/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/decisions/__init__.py +++ b/bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/decisions/__init__.py @@ -0,0 +1,6 @@ +# Setting up runtime type checking for this package +# We need to do this again here because the dsd imports +# the decisions and actions from this package in a standalone way +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_misc/bitbots_tf_buffer/bitbots_tf_buffer/__init__.py b/bitbots_misc/bitbots_tf_buffer/bitbots_tf_buffer/__init__.py index 33230d76e..cf824a0b6 100644 --- a/bitbots_misc/bitbots_tf_buffer/bitbots_tf_buffer/__init__.py +++ b/bitbots_misc/bitbots_tf_buffer/bitbots_tf_buffer/__init__.py @@ -1,6 +1,9 @@ from typing import Optional import tf2_ros as tf2 + +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package from builtin_interfaces.msg import Duration as DurationMsg from builtin_interfaces.msg import Time as TimeMsg from geometry_msgs.msg import TransformStamped @@ -10,6 +13,8 @@ from bitbots_tf_buffer.cpp_wrapper import Buffer as CppBuffer +beartype_this_package() + class Buffer(tf2.BufferCore, tf2.BufferInterface): """ diff --git a/bitbots_misc/bitbots_tts/bitbots_tts/__init__.py b/bitbots_misc/bitbots_tts/bitbots_tts/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_misc/bitbots_tts/bitbots_tts/__init__.py +++ b/bitbots_misc/bitbots_tts/bitbots_tts/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_misc/bitbots_utils/bitbots_utils/__init__.py b/bitbots_misc/bitbots_utils/bitbots_utils/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_misc/bitbots_utils/bitbots_utils/__init__.py +++ b/bitbots_misc/bitbots_utils/bitbots_utils/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_misc/system_monitor/system_monitor/__init__.py b/bitbots_misc/system_monitor/system_monitor/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_misc/system_monitor/system_monitor/__init__.py +++ b/bitbots_misc/system_monitor/system_monitor/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_motion/bitbots_animation_rqt/bitbots_animation_rqt/__init__.py b/bitbots_motion/bitbots_animation_rqt/bitbots_animation_rqt/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_motion/bitbots_animation_rqt/bitbots_animation_rqt/__init__.py +++ b/bitbots_motion/bitbots_animation_rqt/bitbots_animation_rqt/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_motion/bitbots_splines/bitbots_splines/__init__.py b/bitbots_motion/bitbots_splines/bitbots_splines/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_motion/bitbots_splines/bitbots_splines/__init__.py +++ b/bitbots_motion/bitbots_splines/bitbots_splines/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/__init__.py b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/__init__.py +++ b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/actions/__init__.py b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/actions/__init__.py index 47ca48a40..97438cbf9 100644 --- a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/actions/__init__.py +++ b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/actions/__init__.py @@ -1,7 +1,13 @@ +# Setting up runtime type checking for this package +# We need to do this again here because the dsd imports +# the decisions and actions from this package in a standalone way +from beartype.claw import beartype_this_package from dynamic_stack_decider.abstract_action_element import AbstractActionElement from bitbots_localization_handler.localization_dsd.localization_blackboard import LocalizationBlackboard +beartype_this_package() + class AbstractLocalizationActionElement(AbstractActionElement): """ diff --git a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/decisions/__init__.py b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/decisions/__init__.py index 99892af44..e2df4305d 100644 --- a/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/decisions/__init__.py +++ b/bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_dsd/decisions/__init__.py @@ -1,7 +1,13 @@ +# Setting up runtime type checking for this package +# We need to do this again here because the dsd imports +# the decisions and actions from this package in a standalone way +from beartype.claw import beartype_this_package from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement from bitbots_localization_handler.localization_dsd.localization_blackboard import LocalizationBlackboard +beartype_this_package() + class AbstractLocalizationDecisionElement(AbstractDecisionElement): """ diff --git a/bitbots_navigation/bitbots_path_planning/bitbots_path_planning/__init__.py b/bitbots_navigation/bitbots_path_planning/bitbots_path_planning/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_navigation/bitbots_path_planning/bitbots_path_planning/__init__.py +++ b/bitbots_navigation/bitbots_path_planning/bitbots_path_planning/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_simulation/bitbots_webots_sim/bitbots_webots_sim/__init__.py b/bitbots_simulation/bitbots_webots_sim/bitbots_webots_sim/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_simulation/bitbots_webots_sim/bitbots_webots_sim/__init__.py +++ b/bitbots_simulation/bitbots_webots_sim/bitbots_webots_sim/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/__init__.py b/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/__init__.py +++ b/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_team_communication/bitbots_team_data_sim_rqt/bitbots_team_data_sim_rqt/__init__.py b/bitbots_team_communication/bitbots_team_data_sim_rqt/bitbots_team_data_sim_rqt/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_team_communication/bitbots_team_data_sim_rqt/bitbots_team_data_sim_rqt/__init__.py +++ b/bitbots_team_communication/bitbots_team_data_sim_rqt/bitbots_team_data_sim_rqt/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_vision/bitbots_vision/__init__.py b/bitbots_vision/bitbots_vision/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_vision/bitbots_vision/__init__.py +++ b/bitbots_vision/bitbots_vision/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_world_model/bitbots_ball_filter/bitbots_ball_filter/__init__.py b/bitbots_world_model/bitbots_ball_filter/bitbots_ball_filter/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_world_model/bitbots_ball_filter/bitbots_ball_filter/__init__.py +++ b/bitbots_world_model/bitbots_ball_filter/bitbots_ball_filter/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package() diff --git a/bitbots_world_model/bitbots_robot_filter/bitbots_robot_filter/__init__.py b/bitbots_world_model/bitbots_robot_filter/bitbots_robot_filter/__init__.py index e69de29bb..4d2e15007 100644 --- a/bitbots_world_model/bitbots_robot_filter/bitbots_robot_filter/__init__.py +++ b/bitbots_world_model/bitbots_robot_filter/bitbots_robot_filter/__init__.py @@ -0,0 +1,4 @@ +# Setting up runtime type checking for this package +from beartype.claw import beartype_this_package + +beartype_this_package()