(repo_name)
| 13 | |
| 14 | |
| 15 | def resolve_repository_name(repo_name): |
| 16 | if '://' in repo_name: |
| 17 | raise errors.InvalidRepository( |
| 18 | f'Repository name cannot contain a scheme ({repo_name})' |
| 19 | ) |
| 20 | |
| 21 | index_name, remote_name = split_repo_name(repo_name) |
| 22 | if index_name[0] == '-' or index_name[-1] == '-': |
| 23 | raise errors.InvalidRepository( |
| 24 | f'Invalid index name ({index_name}). ' |
| 25 | 'Cannot begin or end with a hyphen.' |
| 26 | ) |
| 27 | return resolve_index_name(index_name), remote_name |
| 28 | |
| 29 | |
| 30 | def resolve_index_name(index_name): |
nothing calls this directly
no test coverage detected