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

Function registerCodeLensCommands

lsp/src/codeLens.ts:322–345  ·  view source on GitHub ↗
(
  context: ExtensionContext,
  pythonEnv: PythonEnvironment,
)

Source from the content-addressed store, hash-verified

320}
321
322export function registerCodeLensCommands(
323 context: ExtensionContext,
324 pythonEnv: PythonEnvironment,
325): void {
326 context.subscriptions.push(
327 vscode.commands.registerCommand('pyrefly.runTest', async args => {
328 const parsedArgs = parseRunTestArgs(args);
329 if (!parsedArgs) {
330 return;
331 }
332 await runTestAtLocation(parsedArgs, pythonEnv);
333 }),
334 );
335
336 context.subscriptions.push(
337 vscode.commands.registerCommand('pyrefly.runMain', async args => {
338 const parsedArgs = parseRunMainArgs(args);
339 if (!parsedArgs) {
340 return;
341 }
342 await runMainFile(parsedArgs, pythonEnv);
343 }),
344 );
345}

Callers 1

activateFunction · 0.90

Calls 5

parseRunTestArgsFunction · 0.85
runTestAtLocationFunction · 0.85
parseRunMainArgsFunction · 0.85
runMainFileFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected