MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pylsp_class_sites

Function pylsp_class_sites

tests/test_py_lsp.c:3473–3491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3471} PylspClassSite;
3472
3473static bool pylsp_class_sites(const CBMFileResult *r, const char *source,
3474 const PylspClassSite *sites, size_t count) {
3475 if (!r || r->has_error || r->parse_incomplete || r->lsp_skipped || !r->module_qn)
3476 return false;
3477 for (size_t i = 0; i < count; i++) {
3478 const PylspClassSite *s = &sites[i];
3479 if (strcmp(s->caller, r->module_qn) != 0 && !pylsp_module_has_def(r, s->caller))
3480 return false;
3481 if (s->target) {
3482 if (!pylsp_module_has_def(r, s->target) ||
3483 !pylsp_module_site_joins(&r->calls, &r->resolved_calls, source, s->site, s->caller,
3484 s->target))
3485 return false;
3486 } else if (!pylsp_class_site_unjoined(r, source, s->site, s->caller)) {
3487 return false;
3488 }
3489 }
3490 return true;
3491}
3492
3493TEST(pylsp_classbody_calls_join_extracted_caller) {
3494 static const char source[] =

Callers 1

test_py_lsp.cFile · 0.85

Calls 3

pylsp_module_has_defFunction · 0.85
pylsp_module_site_joinsFunction · 0.85

Tested by

no test coverage detected