MCPcopy Create free account
hub / github.com/vercel/vercel / detectGenericPythonEntrypoint

Function detectGenericPythonEntrypoint

packages/python/src/entrypoint.ts:419–440  ·  view source on GitHub ↗
(workPath: string)

Source from the content-addressed store, hash-verified

417 * Detect a Python entrypoint for any Python framework using AST-based detection.
418 */
419export async function detectGenericPythonEntrypoint(workPath: string): Promise<{
420 detected: DetectedPythonEntrypoint | null;
421 findDiagnostics: FindResult;
422}> {
423 try {
424 // Search candidate locations using AST-based detection
425 const result = await findValidEntrypoint(
426 workPath,
427 PYTHON_CANDIDATE_ENTRYPOINTS
428 );
429 return {
430 detected: result.entrypoint ? { entrypoint: result.entrypoint } : null,
431 findDiagnostics: result,
432 };
433 } catch {
434 debug('Failed to discover Python entrypoint');
435 return {
436 detected: null,
437 findDiagnostics: { entrypoint: null, existingWithoutEntrypoint: [] },
438 };
439 }
440}
441
442/**
443 * Detect a Django Python entrypoint: look for manage.py with

Callers 1

detectPythonEntrypointFunction · 0.85

Calls 2

debugFunction · 0.90
findValidEntrypointFunction · 0.85

Tested by

no test coverage detected