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

Function detect

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

readFileMethod · 0.80
fileExistsMethod · 0.80
getAllFilesMethod · 0.65

Tested by

no test coverage detected