Skip to content

Commit 4f097e8

Browse files
author
Adrian Freihofer
committed
Feat: add ../scripts/lib to python analysis paths
This resolves a bunch of "unresolved import" errors for scripts like devtool or wic.
1 parent 9157d36 commit 4f097e8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

client/src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ function updatePythonPath (): void {
7777
const pathToBitbakeFolder = bitbakeConfig.pathToBitbakeFolder
7878
const pathToBitbakeLib = `${pathToBitbakeFolder}/lib`
7979
const pathToPokyMetaLib = path.join(pathToBitbakeFolder, '../meta/lib') // We assume BitBake is into Poky
80+
const pathToScriptsLib = path.join(pathToBitbakeFolder, '../scripts/lib') // Add scripts/lib
8081
for (const pythonSubConf of ['autoComplete.extraPaths', 'analysis.extraPaths']) {
8182
let extraPaths = pythonConfig.get<string[]>(pythonSubConf) ?? []
8283
if (!Object.isExtensible(extraPaths)) extraPaths = []
83-
for (const pathToAdd of [pathToBitbakeLib, pathToPokyMetaLib]) {
84+
for (const pathToAdd of [pathToBitbakeLib, pathToPokyMetaLib, pathToScriptsLib]) {
8485
if (!extraPaths.includes(pathToAdd)) {
8586
extraPaths.push(pathToAdd)
8687
}

0 commit comments

Comments
 (0)