MCPcopy Index your code
hub / github.com/deepnote/deepnote / selectScopeNotebooks

Function selectScopeNotebooks

packages/cli/src/commands/run.ts:416–426  ·  view source on GitHub ↗
(
  notebooks: DeepnoteFile['project']['notebooks'],
  options: { notebook?: string; block?: string }
)

Source from the content-addressed store, hash-verified

414}
415
416function selectScopeNotebooks(
417 notebooks: DeepnoteFile['project']['notebooks'],
418 options: { notebook?: string; block?: string }
419): DeepnoteFile['project']['notebooks'] {
420 if (options.notebook) {
421 return notebooks
422 }
423
424 const notebookWithTargetBlock = notebooks.find(notebook => notebook.blocks.some(block => block.id === options.block))
425 return notebookWithTargetBlock ? [notebookWithTargetBlock] : notebooks
426}
427
428function assertExecutableBlockExists(blockId: string, notebooks: DeepnoteFile['project']['notebooks']): void {
429 for (const notebook of notebooks) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected