def determ_category(node: tg.Text) -> int: """Defer node by there name Should be consisdent with CATEGORYLIST """ if node.startswith('[merged]'): return 2 if node.endswith('cpp'): return 0 if node.endswith('h') or node.endswith('hpp'): return 1 return 3
def get_uri(value: t.Text) -> t.Text: if value.startswith('storage:'): raise ValueError(f"Storage schema is not yet supported") return os.path.abspath(os.path.expanduser(value))
def _storage_not_supported(_uri: t.Text) -> t.Text: """ Helper function to guard against unsupported storage. """ _uri = _uri.strip() if _uri.startswith('storage:'): raise NotImplementedError(f"Storage protocol (uri={_uri}) is not supported yet.") return _uri