extraPaths
in executionEnvironments
extends the default extraPaths
instead of overriding them
#9636
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Describe the bug
extraPaths
inexecutionEnvironments
extends the defaultextraPaths
instead of overriding them.I use VS Code (Code OSS) with the pyright extension of version 1.1.391 to open a project with the following directory structure and
pyrightconfig.json
:In
test.py
, pyright works as expected.import lib1
andimport lib0
is ok whileimport lib2
results in an error, and the importedlib0
is the module underextra1
.In
sub/subtest.py
, pyright does not work as described in the documentation.import lib2
is ok, butimport lib1
is also ok andimport lib0
imports the module underextra1
instead ofextra2
. The documentation ofextraPaths
inexecutionEnvironments
says, 'If specified, this overrides the default extraPaths setting when resolving imports for files within this execution environment.' However, the actual behavior ofextraPaths
is extending the defaultextraPaths
instead of overriding them.VS Code extension or command-line
VS Code extension (VS Code OSS on Linux), version 1.1.391.
The text was updated successfully, but these errors were encountered: