mirror of https://github.com/pypa/pip
Add more explanation to parse_netloc()'s docstrings.
This addresses @pradyunsg's review comments.
This commit is contained in:
parent
e37a17cc09
commit
977d0740fb
|
@ -218,6 +218,11 @@ class VersionControl(object):
|
|||
Parse the repository URL's netloc, and return the new netloc to use
|
||||
along with auth information.
|
||||
|
||||
This is mainly for the Subversion class to override, so that auth
|
||||
information can be provided via the --username and --password options
|
||||
instead of through the URL. For other subclasses like Git without
|
||||
such an option, auth information must stay in the URL.
|
||||
|
||||
Returns: (netloc, username, password).
|
||||
"""
|
||||
return netloc, None, None
|
||||
|
|
|
@ -133,6 +133,9 @@ class Subversion(VersionControl):
|
|||
def parse_netloc(self, netloc):
|
||||
"""
|
||||
Parse out and remove from the netloc the auth information.
|
||||
|
||||
This allows the auth information to be provided via the --username
|
||||
and --password options instead of via the URL.
|
||||
"""
|
||||
if '@' not in netloc:
|
||||
return netloc, None, None
|
||||
|
|
Loading…
Reference in New Issue