IdShortsAreUnique🔗

Type: Transpilable verification function
Check that the Referable.idShort's among the referables are unique in their namespace.

Code

id_short_set: Set[str] = set()
for referable in referables:
    id_short = referable.ID_short
    if id_short is None:
        continue

    if id_short in id_short_set:
        return False

    id_short_set.add(id_short)

return True