Skip to main content

A hack to get your editor to recognise rospy functions without installing ros on your system.

Project description

rospy-nonlocalstubs

A hack to get your editor to recognise rospy functions without installing ros 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 envoirement 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 re-itterate: this is an ugly hack that just happens to work awfully conveniently.

Please do not install this package in any envoirement that also has ros installed. That might break stuff.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rospy-nonlocalstubs-0.1.0.tar.gz (21.0 kB view hashes)

Uploaded Source

Built Distribution

rospy_nonlocalstubs-0.1.0-py3-none-any.whl (36.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page