FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Enable autoSearchPaths to match pyright's CLI by dreddnafious · Pull Request #222 · sourcegraph/scip-python · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ts  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 9 additions & 0 deletions packages/pyright-scip/src/config.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ export class ScipPyrightConfig {
// TODO: This probably should be ScipConfig.workspaceroot or similar?
const options = new CommandLineOptions(process.cwd(), false);

// Match pyright's CLI, which always enables this (see pyright.ts:
// "Always enable autoSearchPaths when using the command line.").
// Without it, ensureDefaultExtraPaths() below never adds ./src, so
// src-layout projects resolve definitions under `src.pkg.mod` while
// imports resolve to `pkg.mod`, and cross-package references are lost.
// An explicit extraPaths in pyrightconfig.json / [tool.pyright] still
// takes precedence, so configured projects are unaffected.
options.autoSearchPaths = true;

let config = this._getConfigOptions(host, options);
config.checkOnlyOpenFiles = false;
config.indexing = true;
Expand Down

Back | FazBrowse Home | New Git URL