(
interactiveWindowProvider: IInteractiveWindowProvider,
source: string,
disposables: vscode.Disposable[]
)
| 172 | } |
| 173 | |
| 174 | export async function runNewPythonFile( |
| 175 | interactiveWindowProvider: IInteractiveWindowProvider, |
| 176 | source: string, |
| 177 | disposables: vscode.Disposable[] |
| 178 | ) { |
| 179 | const tempFile = await createTemporaryFile({ contents: source, extension: '.py' }); |
| 180 | disposables.push(tempFile); |
| 181 | const untitledPythonFile = await vscode.workspace.openTextDocument(tempFile.file); |
| 182 | const activeInteractiveWindow = await runCurrentFile(interactiveWindowProvider, untitledPythonFile); |
| 183 | return { activeInteractiveWindow, untitledPythonFile }; |
| 184 | } |
| 185 | |
| 186 | export async function runCurrentFile(interactiveWindowProvider: IInteractiveWindowProvider, file: vscode.TextDocument) { |
| 187 | await vscode.window.showTextDocument(file, vscode.ViewColumn.One); |
no test coverage detected