MCPcopy Index your code
hub / github.com/python/mypy / group_name

Function group_name

mypyc/build.py:286–293  ·  view source on GitHub ↗

Produce a probably unique name for a group from a list of module names.

(modules: list[str])

Source from the content-addressed store, hash-verified

284
285
286def group_name(modules: list[str]) -> str:
287 """Produce a probably unique name for a group from a list of module names."""
288 if len(modules) == 1:
289 return modules[0]
290
291 h = hashlib.sha1()
292 h.update(",".join(modules).encode())
293 return h.hexdigest()[:20]
294
295
296def include_dir() -> str:

Callers 1

construct_groupsFunction · 0.85

Calls 4

lenFunction · 0.85
encodeMethod · 0.80
updateMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…