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

Function classifyPyFile

packages/convert/src/cli.ts:96–107  ·  view source on GitHub ↗
(
      pyFile: string
    )

Source from the content-addressed store, hash-verified

94
95 // Read and classify .py files in parallel with bounded concurrency
96 const classifyPyFile = async (
97 pyFile: string
98 ): Promise<{ file: string; type: 'marimo' | 'percent' | 'unknown' }> => {
99 const content = await fs.readFile(resolve(absolutePath, pyFile), 'utf-8')
100 if (isMarimoContent(content)) {
101 return { file: pyFile, type: 'marimo' }
102 }
103 if (isPercentContent(content)) {
104 return { file: pyFile, type: 'percent' }
105 }
106 return { file: pyFile, type: 'unknown' }
107 }
108
109 // Use bounded concurrency to avoid overwhelming the file system
110 const CONCURRENCY_LIMIT = 10

Callers

nothing calls this directly

Calls 2

isMarimoContentFunction · 0.90
isPercentContentFunction · 0.90

Tested by

no test coverage detected