-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add types to TypeHash and moved away from __slots__ usage #1232
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Michael Carlstrom <[email protected]>
fujitatomoya
approved these changes
Feb 28, 2024
Signed-off-by: Michael Carlstrom <[email protected]>
sloretz
approved these changes
Mar 8, 2024
CI (repos file build: |
It turns out that this isn't enough CI; this is causing failures in CI now: https://ci.ros2.org/job/ci_linux/20452/testReport/junit/ros2cli.ros2cli.test/test_daemon/test_get_subscriptions_info_by_topic/ . I'm going to propose a revert here. |
clalancette
added a commit
that referenced
this pull request
Mar 9, 2024
)" This reverts commit b06baef.
InvincibleRMC
added a commit
to InvincibleRMC/rclpy
that referenced
this pull request
Mar 24, 2024
* Add types to TypeHash and moved away from __slots__ usage Signed-off-by: Michael Carlstrom <[email protected]> * remove docstring types Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]>
InvincibleRMC
pushed a commit
to InvincibleRMC/rclpy
that referenced
this pull request
Mar 24, 2024
…s2#1232)" (ros2#1243) This reverts commit b06baef. Signed-off-by: Michael Carlstrom <[email protected]>
InvincibleRMC
pushed a commit
to InvincibleRMC/rclpy
that referenced
this pull request
Mar 27, 2024
…s2#1232)" (ros2#1243) This reverts commit b06baef. Signed-off-by: Michael Carlstrom <[email protected]>
sloretz
added a commit
that referenced
this pull request
May 3, 2024
* First draft of generics Signed-off-by: Michael Carlstrom <[email protected]> * Fix Generic Signed-off-by: Michael Carlstrom <[email protected]> * Add legacy Signed-off-by: Michael Carlstrom <[email protected]> * Fix import order Signed-off-by: Michael Carlstrom <[email protected]> * fix import order Signed-off-by: Michael Carlstrom <[email protected]> * Add Docstrings Signed-off-by: Michael Carlstrom <[email protected]> * Add Docstrings Signed-off-by: Michael Carlstrom <[email protected]> * Add generics support to Node Signed-off-by: Michael Carlstrom <[email protected]> * Update type_support.py Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Add types to expand_topic_name (#1238) Signed-off-by: Michael Carlstrom <[email protected]> * Creates Enum wrapper for ClockType and ClockChange (#1235) * Testing out Enum wrapper for ClockType * convert to rcl_clock_type_t * Update create_time_point Signed-off-by: Michael Carlstrom <[email protected]> * Add types (#1231) Signed-off-by: Michael Carlstrom <[email protected]> * Add types to exceptions.py (#1241) * Add types to exception * Add type checking guard * Fix NotInitializedException * Add missing defualt Signed-off-by: Michael Carlstrom <[email protected]> * added python3-yaml (#1242) Signed-off-by: SnIcK <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Add types to duration.py (#1233) * Add types to logging_service.py (#1227) * add types to logging_service * Add types to duration.py * Add newlines for class definintions * update type alias name * Update to use Protocols Signed-off-by: Michael Carlstrom <[email protected]> * Add Static Typing to Validate files (#1230) * Add types to validate files Signed-off-by: Michael Carlstrom <[email protected]> * remove type annotations from docstrings Signed-off-by: Michael Carlstrom <[email protected]> * removed other type annotated docstrings Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Add types to TypeHash and moved away from __slots__ usage (#1232) * Add types to TypeHash and moved away from __slots__ usage Signed-off-by: Michael Carlstrom <[email protected]> * remove docstring types Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Time.py Types (#1237) * Start typing time.py Signed-off-by: Michael Carlstrom <[email protected]> * Testing out Enum wrapper for ClockType Signed-off-by: Michael Carlstrom <[email protected]> * convert to rcl_clock_type_t Signed-off-by: Michael Carlstrom <[email protected]> * Undo Change to time_point.cpp Signed-off-by: Michael Carlstrom <[email protected]> * Update create_time_point Signed-off-by: Michael Carlstrom <[email protected]> * Lint fixes Signed-off-by: Michael Carlstrom <[email protected]> * Add debug message Signed-off-by: Michael Carlstrom <[email protected]> * Remove test file Signed-off-by: Michael Carlstrom <[email protected]> * Try extending the type assert Signed-off-by: Michael Carlstrom <[email protected]> * Add types to logging_service.py (#1227) * add types to logging_service Signed-off-by: Michael Carlstrom <[email protected]> * Add types to duration.py Signed-off-by: Michael Carlstrom <[email protected]> * Add newlines for class definintions Signed-off-by: Michael Carlstrom <[email protected]> * update type alias name Signed-off-by: Michael Carlstrom <[email protected]> * Remove newline Signed-off-by: Michael Carlstrom <[email protected]> * Merge? Signed-off-by: Michael Carlstrom <[email protected]> * Fix failed merge Signed-off-by: Michael Carlstrom <[email protected]> * Update to use Protocols Signed-off-by: Michael Carlstrom <[email protected]> * Fix import error Signed-off-by: Michael Carlstrom <[email protected]> * Add types to time.py Signed-off-by: Michael Carlstrom <[email protected]> * Linty Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Revert "Add types to TypeHash and moved away from __slots__ usage (#1232)" (#1243) This reverts commit b06baef. Signed-off-by: Michael Carlstrom <[email protected]> * Add back Type hash __slots__ and add test cases. (#1245) * Add types to TypeHash and add test cases Signed-off-by: Michael Carlstrom <[email protected]> * Add types to context.py (#1240) Signed-off-by: Michael Carlstrom <[email protected]> * fix pub and sub Signed-off-by: Michael Carlstrom <[email protected]> * Update LifecyclePublisher Signed-off-by: Michael Carlstrom <[email protected]> * Fix docstring Signed-off-by: Michael Carlstrom <[email protected]> * serialization generic Signed-off-by: Michael Carlstrom <[email protected]> * serialization generic Signed-off-by: Michael Carlstrom <[email protected]> * Update type_support.py Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: SnIcK <[email protected]> Signed-off-by: Shane Loretz <[email protected]> Co-authored-by: SnIcK <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Shane Loretz <[email protected]>
sloretz
added a commit
that referenced
this pull request
Aug 2, 2024
* Add types to parameter.py Signed-off-by: Michael Carlstrom <[email protected]> * Revert "Add types to TypeHash and moved away from __slots__ usage (#1232)" (#1243) This reverts commit b06baef. Signed-off-by: Michael Carlstrom <[email protected]> * Add back Type hash __slots__ and add test cases. (#1245) * Add types to TypeHash and add test cases Signed-off-by: Michael Carlstrom <[email protected]> * Add types to context.py (#1240) Signed-off-by: Michael Carlstrom <[email protected]> * Add types to qos_overriding_options.py (#1248) Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Small fixes for modern flake8. (#1264) It doesn't like to compare types with ==, so switch to isinstance as appropriate. Signed-off-by: Chris Lalancette <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Add types to time_source.py (#1259) * Add types to time_source.py Signed-off-by: Michael Carlstrom <[email protected]> * fix small bug Signed-off-by: Michael Carlstrom <[email protected]> * Switch to overloads to avoid mypy3737 Signed-off-by: Michael Carlstrom <[email protected]> * Update parameter declaration from Node Signed-off-by: Michael Carlstrom <[email protected]> * add back rclpy. Signed-off-by: Michael Carlstrom <[email protected]> * Fix flake8 imports Signed-off-by: Michael Carlstrom <[email protected]> * Add proper array.array[] Signed-off-by: Michael Carlstrom <[email protected]> * Update types of declare_parameter, declare_parameters api Signed-off-by: Michael Carlstrom <[email protected]> * Add non conflicting types back to constructor Signed-off-by: Michael Carlstrom <[email protected]> * Move sys import Signed-off-by: Michael Carlstrom <[email protected]> * Update error message Signed-off-by: Michael Carlstrom <[email protected]> * Add default value for generic Parameter Signed-off-by: Michael Carlstrom <[email protected]> * Add explanation comment Signed-off-by: Michael Carlstrom <[email protected]> * Add TypeVar import inside else case Signed-off-by: Michael Carlstrom <[email protected]> * push to rerun ci Signed-off-by: Michael Carlstrom <[email protected]> * push to rerun ci Signed-off-by: Michael Carlstrom <[email protected]> * Switch back to union Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Shane Loretz <[email protected]>
sloretz
added a commit
that referenced
this pull request
Aug 5, 2024
* First draft of generics Signed-off-by: Michael Carlstrom <[email protected]> * Fix Generic Signed-off-by: Michael Carlstrom <[email protected]> * Add legacy Signed-off-by: Michael Carlstrom <[email protected]> * Fix import order Signed-off-by: Michael Carlstrom <[email protected]> * fix import order Signed-off-by: Michael Carlstrom <[email protected]> * Add Docstrings Signed-off-by: Michael Carlstrom <[email protected]> * Add Docstrings Signed-off-by: Michael Carlstrom <[email protected]> * Add generics support to Node Signed-off-by: Michael Carlstrom <[email protected]> * Update type_support.py Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Add types to expand_topic_name (#1238) Signed-off-by: Michael Carlstrom <[email protected]> * Creates Enum wrapper for ClockType and ClockChange (#1235) * Testing out Enum wrapper for ClockType * convert to rcl_clock_type_t * Update create_time_point Signed-off-by: Michael Carlstrom <[email protected]> * Add types (#1231) Signed-off-by: Michael Carlstrom <[email protected]> * Add types to exceptions.py (#1241) * Add types to exception * Add type checking guard * Fix NotInitializedException * Add missing defualt Signed-off-by: Michael Carlstrom <[email protected]> * added python3-yaml (#1242) Signed-off-by: SnIcK <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> * Add types to duration.py (#1233) * Add types to logging_service.py (#1227) * add types to logging_service * Add types to duration.py * Add newlines for class definintions * update type alias name * Update to use Protocols Signed-off-by: Michael Carlstrom <[email protected]> * Add Static Typing to Validate files (#1230) * Add types to validate files Signed-off-by: Michael Carlstrom <[email protected]> * remove type annotations from docstrings Signed-off-by: Michael Carlstrom <[email protected]> * removed other type annotated docstrings Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Add types to TypeHash and moved away from __slots__ usage (#1232) * Add types to TypeHash and moved away from __slots__ usage Signed-off-by: Michael Carlstrom <[email protected]> * remove docstring types Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Time.py Types (#1237) * Start typing time.py Signed-off-by: Michael Carlstrom <[email protected]> * Testing out Enum wrapper for ClockType Signed-off-by: Michael Carlstrom <[email protected]> * convert to rcl_clock_type_t Signed-off-by: Michael Carlstrom <[email protected]> * Undo Change to time_point.cpp Signed-off-by: Michael Carlstrom <[email protected]> * Update create_time_point Signed-off-by: Michael Carlstrom <[email protected]> * Lint fixes Signed-off-by: Michael Carlstrom <[email protected]> * Add debug message Signed-off-by: Michael Carlstrom <[email protected]> * Remove test file Signed-off-by: Michael Carlstrom <[email protected]> * Try extending the type assert Signed-off-by: Michael Carlstrom <[email protected]> * Add types to logging_service.py (#1227) * add types to logging_service Signed-off-by: Michael Carlstrom <[email protected]> * Add types to duration.py Signed-off-by: Michael Carlstrom <[email protected]> * Add newlines for class definintions Signed-off-by: Michael Carlstrom <[email protected]> * update type alias name Signed-off-by: Michael Carlstrom <[email protected]> * Remove newline Signed-off-by: Michael Carlstrom <[email protected]> * Merge? Signed-off-by: Michael Carlstrom <[email protected]> * Fix failed merge Signed-off-by: Michael Carlstrom <[email protected]> * Update to use Protocols Signed-off-by: Michael Carlstrom <[email protected]> * Fix import error Signed-off-by: Michael Carlstrom <[email protected]> * Add types to time.py Signed-off-by: Michael Carlstrom <[email protected]> * Linty Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> * Revert "Add types to TypeHash and moved away from __slots__ usage (#1232)" (#1243) This reverts commit b06baef. Signed-off-by: Michael Carlstrom <[email protected]> * Add back Type hash __slots__ and add test cases. (#1245) * Add types to TypeHash and add test cases Signed-off-by: Michael Carlstrom <[email protected]> * Add types to context.py (#1240) Signed-off-by: Michael Carlstrom <[email protected]> * fix pub and sub Signed-off-by: Michael Carlstrom <[email protected]> * Update LifecyclePublisher Signed-off-by: Michael Carlstrom <[email protected]> * Fix docstring Signed-off-by: Michael Carlstrom <[email protected]> * Start implementation Signed-off-by: Michael Carlstrom <[email protected]> * Ungeneric? Signed-off-by: Michael Carlstrom <[email protected]> * Stuff Signed-off-by: Michael Carlstrom <[email protected]> * serialization generic Signed-off-by: Michael Carlstrom <[email protected]> * serialization generic Signed-off-by: Michael Carlstrom <[email protected]> * Update type_support.py Signed-off-by: Michael Carlstrom <[email protected]> * Client Service Generic Implementation Signed-off-by: Michael Carlstrom <[email protected]> * Fix debug relative import Signed-off-by: Michael Carlstrom <[email protected]> * Update imports Signed-off-by: Michael Carlstrom <[email protected]> * Add generics to node.py Signed-off-by: Michael Carlstrom <[email protected]> * Update import order Signed-off-by: Michael Carlstrom <[email protected]> * Remove double bracket Signed-off-by: Michael Carlstrom <[email protected]> --------- Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: Michael Carlstrom <[email protected]> Signed-off-by: SnIcK <[email protected]> Co-authored-by: SnIcK <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Shane Loretz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds static typing to type_hash.py. In the constructor I switch away from
**kwargs
to explicit variable names. If there is some reason the**kwargs
is preferred for now I can use Any. Just let me know so I can add a TODO to use Unpack[] when python 3.12 is supported. Or I suppose I could use typing_extensions package to use Unpack on older versions of python.