Skip to content

Commit 5e585d0

Browse files
committed
Fix mypyc error for similar module full names
1 parent b16c192 commit 5e585d0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mypyc/namegen.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ def make_module_translation_map(names: list[str]) -> dict[str, str]:
100100
for name in names:
101101
for suffix in candidate_suffixes(name):
102102
if num_instances[suffix] == 1:
103-
result[name] = suffix
104103
break
105-
else:
106-
assert False, names
104+
# Takes the last suffix if none are unique
105+
result[name] = suffix
107106
return result
108107

109108

0 commit comments

Comments
 (0)