MCPcopy Create free account
hub / github.com/facebook/pyrefly / onDidChangeInterpreter

Method onDidChangeInterpreter

lsp/src/python-environment.ts:147–161  ·  view source on GitHub ↗
(
    callback: () => void,
  )

Source from the content-addressed store, hash-verified

145 }
146
147 async onDidChangeInterpreter(
148 callback: () => void,
149 ): Promise<vscode.Disposable> {
150 this.listeners.push(callback);
151 const provider = await this.provider;
152 if (provider) {
153 this.listenerDisposables.push(provider.onDidChange(callback));
154 }
155 return new vscode.Disposable(() => {
156 const idx = this.listeners.indexOf(callback);
157 if (idx >= 0) {
158 this.listeners.splice(idx, 1);
159 }
160 });
161 }
162}

Callers 1

activateFunction · 0.95

Calls 2

onDidChangeMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected