Skip to content

Instantly share code, notes, and snippets.

@AchmadFathoni
Created May 15, 2021 21:03
Show Gist options
  • Save AchmadFathoni/88b832440834c458b55df3d588c49eb2 to your computer and use it in GitHub Desktop.
Save AchmadFathoni/88b832440834c458b55df3d588c49eb2 to your computer and use it in GitHub Desktop.
Integrating Pylint with ROS Python Package using `pylintrc` file
[MASTER]
init-hook='import sys; sys.path.append("src")'
@AchmadFathoni
Copy link
Author

Put that pylintrc to package root directory. The final package file tree should be like this

├── CMakeLists.txt
├── nodes
│   └── convert.py
├── package.xml
├── pylintrc
├── README.md
├── setup.py
└── src
    └── pos2bag
        ├── __init__.py
        ├── llh2xyz.py
        ├── pos_data.py
        └── pos_parser.py

And now pylint won't complain if you import like this

from pos2bag.pos_parser import PosParser
from pos2bag.llh2xyz import LLH2XYZ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment