lifecycle_py: Add ament_mypy support#778
Conversation
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
…and client ros2#766 Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
InvincibleRMC
left a comment
There was a problem hiding this comment.
Looks good. Just small nits about using the modern typing syntax.
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
|
Understood! I will keep this in mind. Thank you for the catch!! |
|
Pulls: #778 |
Looks like it is not supported with mypy 0.20.3 version? . What should I do about this ? |
|
You can probably add a |
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
Signed-off-by: mohit-swaran <mohit.swaran@gmail.com>
|
Pulls: #778 |
|
Same error Should I change it to Any ? |
|
Your type ignore I believe has to be line with the code not above it. And I would make a generic one. not speficically about unused-ignore |
So is it okay to throw error unused-ignore in current version of mypy |
Description
This PR adds ament_mypy support and resolves type-checking errors in the lifecycle_py package
test/test_mypy.pyDict[str, Any]in test_lifecycle.py for thegenerate_test_description()return typemypy --stricterrors found locallyFixes (#768)
Is this user-facing behavior change?
Did you use Generative AI?
No
Additional Information