def repo_id(self, repo: str) -> str:
if repo.startswith("<STR_LIT:http>"):<EOL><INDENT>repo_id = re.sub(r"<STR_LIT>", "<STR_LIT>", repo)<EOL>repo_id = re.sub(r"<STR_LIT>", "<STR_LIT>", repo_id)<EOL><DEDENT>else:<EOL><INDENT>repo_id = repo.replace("<STR_LIT>", "<STR_LIT>")<EOL>repo_id = re.sub(r"<STR_LIT>", "<STR_LIT>", repo_id)<EOL>if repo_id.startswith("<STR_LIT>"):<EOL><INDENT>repo_id = str(Path(repo_id).resolve())<EOL><DEDENT><DEDENT>repo_id = re.sub(r"<STR_LIT>", "<STR_LIT:_>", repo_id)<EOL>return repo_id + hashlib.sha256(repo.encode("<STR_LIT:utf-8>")).hexdigest()<EOL>
Returns an unique identifier from a repo URL for the folder the repo is gonna be pulled in.