-
Notifications
You must be signed in to change notification settings - Fork 45
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
Python type annotation #157
Comments
For now, yes. We need to support Python 3.6 for RHEL-8 compatibility. |
What if separate stubs ( |
Hello. Could you try this repository if you are interested in? As I think it's good to have the feature in this repository, I haven't published this repository to rosdistro, yet. |
Hi @bonprosoft, thanks for that, nice work.
Good idea. I think it should be included. |
This is fantastic! It works wonders. I have added a small rospypi/rosidl_generator_mypy#8 to help fix an issue I was having with some slight issues with array type annotations. Thanks so much for your work. It would be fantastic to see this included in |
Thank you @MrBlenny ! I'm so glad to hear that.
I think so, too! Also, I noticed that It would be wonderful if ROS2 packages work nicely with mypy. |
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 |
Feature request
Feature description
It would be useful if the python classes included type annotations.
For example:
Parent.msg
Child.msg
Would generate something like:
Implementation considerations
@property
getters/setters. For me, usingpylance
the above syntax thinkschild
is of typeproperty
rather than typeChild
from dataclasses import dataclass
gives us most of these features and more. Plus, it can be used with other libraries like daciteThe text was updated successfully, but these errors were encountered: