Add ament_mypy support and strict typing to lifecycle_py#779
Closed
andrearichichi wants to merge 6 commits intoros2:rollingfrom
Closed
Add ament_mypy support and strict typing to lifecycle_py#779andrearichichi wants to merge 6 commits intoros2:rollingfrom
andrearichichi wants to merge 6 commits intoros2:rollingfrom
Conversation
Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
cd6934a to
a66af7c
Compare
… notice Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
b441836 to
503136e
Compare
Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
ac39eb4 to
c59970a
Compare
Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
3654510 to
a38c2c3
Compare
Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
f1bd54a to
d7d7e3b
Compare
Signed-off-by: Andrea Richichi <andrea.richichi@studenti.unitn.it>
d7d7e3b to
fae4a29
Compare
fujitatomoya
requested changes
Mar 17, 2026
| @@ -0,0 +1,65 @@ | |||
| # Copyright 2019 Canonical, Ltd. | |||
Collaborator
There was a problem hiding this comment.
this is fragile? if the package directory structure ever changes, or if a subdirectory is renamed, this test will silently skip files or fail for structural reasons rather than type errors. this should be replaced with the standard minimal form. IMO, if main(argv=[]) doesn't discover the right files in the ament test harness, that's an ament_mypy bug, not something to work around in every consumer package.
Contributor
|
Is a dupe of #778. Feel free to work on an unclaimed typing issue here. You could also start adding typing hints into the basic ros2/examples repo. |
This file contains hidden or 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
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.
Description
This PR adds
ament_mypysupport tolifecycle_pyand updates the package to pass strict mypy checks.Changes include:
ament_mypyas a test dependencytest_mypy.pytesttalker.pytype: ignoreusage to required casesValidation:
python3 -m mypy --strict . --ignore-missing-imports --allow-untyped-calls ament_mypyIs this user-facing behavior change?
No.
Did you use Generative AI?
Yes, partially, with manual review.
Closes #768