(workPath: string)
| 417 | * Detect a Python entrypoint for any Python framework using AST-based detection. |
| 418 | */ |
| 419 | export 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 |
no test coverage detected