Open haudren-woven opened 2 years ago
This issue has been mentioned on ROS Discourse. There might be relevant details there:
https://discourse.ros.org/t/python-type-checking-in-ros2/28507/1
@adityapande-1995 @wjwwood : Any opinions on this? Would you be opposed to some PRs that would improve the situation?
In short, I think we would welcome additions to the typing (there are already some open PRs for this).
I'm also interested in adding ament_mypy
by default, but before we do that I'd want to get a good idea on how much extra time it adds to CI. Our CI already takes many hours, so I don't want to increase that too much (especially on Windows).
I can add that :+1: In my personal testing, running mypy
itself only takes a few seconds.
Found 221 errors in 47 files (checked 121 source files)
mypy --follow-imports=silent src/launch/launch 1.07s user 0.07s system 98% cpu 1.163 total
Bug report
I am sorry to open an issue in such short order, but as part of my work at Woven Planet, I'm trying to use the ROS2 launch system. Unfortunately, I have found that it type information is currently unusable from an external package, thus I'd like to improve it.
Required Info:
Steps to reproduce issue
context = launch.LaunchContext() reveal_type(context)
MYPYPATH=$PATH_TO_WS/install/launch/lib/python3.8/site-packages/ mypy -m launch
test.py:4: note: Revealed type is 'launch.launch_context.LaunchContext'
test.py:1: error: Cannot find implementation or library stub for module named 'launch' test.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports test.py:4: note: Revealed type is 'Any'