Construct valid backends list for error message.

This commit is contained in:
Stéphane Bidoul 2021-01-09 15:48:19 +01:00
parent 3af9093a73
commit 5385d8a6cd
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
1 changed files with 4 additions and 3 deletions

View File

@ -116,10 +116,11 @@ def parse_editable(editable_req):
break
if '+' not in url:
backends = ", ".join([backend.name + '+' for backend in vcs.backends])
raise InstallationError(
'{} is not a valid editable requirement. '
'It should either be a path to a local project or a VCS URL '
'(beginning with svn+, git+, hg+, or bzr+).'.format(editable_req)
f'{editable_req} is not a valid editable requirement. '
f'It should either be a path to a local project or a VCS URL '
f'(beginning with {backends}).'
)
vc_type = url.split('+', 1)[0].lower()