rospy-nonlocalstubs
A hack to get your editor to recognize rospy functions without installing ros or rospy on your system. This is for people like me, who run their ROS nodes inside a docker container and therefore don't have ROS installed on the environment they run their editor in.
This makes use of the fact that most editors/LSPs will also check for the PEP 561 -stubs package, even when the base package is not installed, and the fact that type stubs are still valid, even when all arguments are Any and Incomplete. To reiterate: this is an ugly hack that just happens to work awfully conveniently.
Please do not install this package in any environment that also has ros installed. That might break stuff.
To install, simply run pip install rospy-nonlocalstubs in the same environment as the one your editor lives in.
This package can be automatically updated to the latest version of rospy by anyone who has mypy (more specifically, its submodule stubgen) installed:
# Update the git submodule in which rospy lives
git submodule init && git submodule update
# Generate the stubs with stubgen
./build.sh
Release files for rospy-nonlocalstubs 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rospy-nonlocalstubs-0.1.3.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rospy_nonlocalstubs-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:36.5 kB
Release files / rospy-nonlocalstubs-0.1.3.tar.gz
| Download URL | rospy-nonlocalstubs-0.1.3.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9f05ba61ef1bd91ddfcbb0e6e0891da34e242ef3955e0c575a3e85c17345e72
|
|
BLAKE2b-256 checksum How to use checksums |
31efe5e54a60350a2e1ee47dfe236e53f08d21ffd62eb1ebfd9cced4fef3e1bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / rospy_nonlocalstubs-0.1.3-py3-none-any.whl
| Download URL | rospy_nonlocalstubs-0.1.3-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b82b3e45e65d8148dfa5cab7f8d2f7e6c2b8ba034939359de4d64aa07e3adaa
|
|
BLAKE2b-256 checksum How to use checksums |
5194b440f573f44427c4f3cb656f2551fd7a6823e2ac219e4b34ada2471c8728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|