Skip to content

Commit

Permalink
Fix import error for pylance devel
Browse files Browse the repository at this point in the history
  • Loading branch information
umroverPerception committed Sep 24, 2023
1 parent fb7dd17 commit 097e736
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"ms-vscode.cmake-tools",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"dbaeumer.vscode-eslint",
"redhat.vscode-xml",
"redhat.vscode-yaml",
Expand Down
18 changes: 7 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Catkin only works with Make... ideally we could use Ninja
"cmake.generator": "Unix Makefiles",
// Set to the catkin build directory
"cmake.buildDirectory": "${workspaceFolder}/../../build/mrover",
"cmake.buildDirectory": "../../build/mrover",
// We want catkin to configure
// VSCode will try to use its own toolchain and ignore the catkin profile
"cmake.configureOnOpen": false,
Expand All @@ -19,21 +19,17 @@
"python.analysis.inlayHints.variableTypes": true,
"python.analysis.inlayHints.callArgumentNames": "all",
"python.analysis.inlayHints.functionReturnTypes": true,
"python.autoComplete.extraPaths": [
"/opt/ros/noetic/lib/python3/dist-packages",
"${workspaceFolder}/../../devel/lib/python3/dist-packages",
],
// ~/catkin_ws/devel/lib/python3/dist-packages is already in PYTHONPATH,
// but Pylance currently has a bug where it cannot handle the symlinks in it.
// Below we are just putting directly where those symlinks go
"python.analysis.extraPaths": [
"/opt/ros/noetic/lib/python3/dist-packages",
"${workspaceFolder}/../../devel/lib/python3/dist-packages",
"../../devel/.private/mrover/lib/python3/dist-packages",
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
},
"mypy-type-checker.args": [
"--config-file=${workspaceFolder}/mypy.ini",
],
// We use mypy for this, see style.sh
"python.analysis.typeCheckingMode": "off",
//// Miscellaneous
"redhat.telemetry.enabled": false,
"python.analysis.typeCheckingMode": "basic",
}

0 comments on commit 097e736

Please sign in to comment.