git_auth: Add some docstrings

Change-Id: I6bb0299cadfd92304a112e2d90a926c6006d1a46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7164717
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Allen Li <ayatane@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Allen Li
2025-11-18 11:41:59 -08:00
committed by LUCI CQ
parent 565cc4ee35
commit b8f203014f

View File

@@ -613,6 +613,10 @@ class ConfigWizard(object):
def _set_url_rewrite_override(self, parts: urllib.parse.SplitResult, *,
scope: scm.GitConfigScope) -> None:
"""Set a URL rewrite config that rewrites a URL to itself.
This is used to override a global rewrite rule.
"""
url_key = _url_rewrite_key(parts)
self._set_config(url_key, parts.geturl(), modify_all=True, scope=scope)
@@ -628,6 +632,7 @@ class ConfigWizard(object):
scope: scm.GitConfigScope,
modify_all: bool = False,
append: bool = False) -> None:
"""Set a Git config option."""
scope_msg = f'In your {scope} Git config,'
if append:
assert value is not None