Skip to content
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

Adding python IDE typing #493

Merged
merged 13 commits into from
May 2, 2024
Merged

Adding python IDE typing #493

merged 13 commits into from
May 2, 2024

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Apr 29, 2024

Adding Python IDE typing by parsing rust docstring into python stubs.

For now this seems to be the only working solution that I have found to have effective typing, reading from: PyO3/pyo3#2454

I had to:

  • removed the experimental submodule as it was weirdly not importable using python standard syntax:
from dora.experimental import ros2_bridge

So it was adding a bit of spaces.

Future PR:

The documentation in the docstring might still have to be reworked a bit, but at least this should create a foundation on which we can build typing.

Copy link
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

apis/python/node/src/lib.rs Outdated Show resolved Hide resolved
apis/python/node/generate_stubs.py Outdated Show resolved Hide resolved
examples/python-ros2-dataflow/random_turtle.py Outdated Show resolved Hide resolved
apis/python/node/dora/__init__.pyi Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@haixuanTao
Copy link
Collaborator Author

output2.mp4

@haixuanTao haixuanTao enabled auto-merge May 2, 2024 08:26
@haixuanTao haixuanTao merged commit d6f13d0 into main May 2, 2024
17 checks passed
@haixuanTao haixuanTao deleted the python-ide-linting branch May 2, 2024 08:39
@haixuanTao haixuanTao mentioned this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants