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

Function pylsp_prefix_oracles

tests/test_py_lsp.c:3927–3940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3925}
3926
3927static bool pylsp_prefix_oracles(const CBMTypeRegistry *reg) {
3928 const char *prefixes[] = {NULL, "", "pkg.", "pkg.sub.",
3929 "pkg.sub.call", "pkg.su.", "pkg.submarine.", "pkg.Type.",
3930 "only.tail.", "missing.", "zzzz."};
3931 for (size_t i = 0; i < sizeof(prefixes) / sizeof(prefixes[0]); i++) {
3932 uint64_t visits = 17;
3933 bool indexed = cbm_registry_has_func_qn_prefix(reg, prefixes[i], &visits);
3934 if (indexed != pylsp_prefix_scan(reg, prefixes[i]) || visits < 17 ||
3935 cbm_registry_has_func_qn_prefix(reg, prefixes[i], NULL) != indexed ||
3936 (!prefixes[i] && visits != 17))
3937 return false;
3938 }
3939 return true;
3940}
3941
3942TEST(pylsp_prefix_order_matches_iterator_and_chain_shadowing) {
3943 CBMArena arena, scratch;

Callers 1

test_py_lsp.cFile · 0.85

Calls 2

pylsp_prefix_scanFunction · 0.85

Tested by

no test coverage detected