Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

test(graph): exempt two qualifier splits the guard does not govern (#1640)

Raghav Chamadiyabc9542877fa9
diff --git a/tests/unit/test_no_bare_type_name_copies.py b/tests/unit/test_no_bare_type_name_copies.py
index 780f333d9..79e9be449 100644
--- a/tests/unit/test_no_bare_type_name_copies.py
+++ b/tests/unit/test_no_bare_type_name_copies.py
@@ -71,9 +71,15 @@ _KNOWN: dict[str, int] = {
# Splits our own `path::Class::method` symbol IDs, which we mint. The
# separator is ours rather than the language's, so the shared helper would
# be answering about a type where these ask about an ID. `models.py` holds
- # the one both resolvers used to duplicate.
- _PREFIX + "call_resolver.py": 2,
+ # the one both resolvers used to duplicate. `call_resolver.py`'s third is
+ # the tail of an import's module path — a module name, not a type.
+ _PREFIX + "call_resolver.py": 3,
_PREFIX + "models.py": 1,
+ # Reads the head to decide whether taking a bare name is safe at all: a
+ # qualifier that is a type rather than a package must not be discarded.
+ # It guards the shared helper and then calls it, so it asks the opposite
+ # question.
+ _PREFIX + "languages/receiver_types.py": 1,
# Normalises the method name out of `#selector(Type.method)`. The last
# segment here is a member, not a type.
_PREFIX + "dynamic_hints/swift.py": 1,