MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / detect

Function detect

src/resolution/frameworks/python.ts:18–26  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

16 languages: ['python'],
17
18 detect(context) {
19 const requirements = context.readFile('requirements.txt');
20 if (requirements && requirements.toLowerCase().includes('django')) return true;
21 const setup = context.readFile('setup.py');
22 if (setup && setup.toLowerCase().includes('django')) return true;
23 const pyproject = context.readFile('pyproject.toml');
24 if (pyproject && pyproject.toLowerCase().includes('django')) return true;
25 return context.fileExists('manage.py');
26 },
27
28 resolve(ref, context) {
29 if (ref.referenceName.endsWith('Model') || /^[A-Z][a-z]+$/.test(ref.referenceName)) {

Callers

nothing calls this directly

Calls 3

fileExistsMethod · 0.80
readFileMethod · 0.65
getAllFilesMethod · 0.65

Tested by

no test coverage detected