File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,9 @@ def _split_inputs(
149149 return Inputs (dists , signatures , attestations_by_dist )
150150
151151
152- def _sanitize_url (url ) -> str :
153- """
152+ def _sanitize_url (url : str ) -> str :
153+ """Sanitize a URL.
154+
154155 Sanitize URLs, removing any user:password combinations and replacing them with
155156 asterisks. Returns the original URL if the string is a non-matching pattern.
156157
@@ -160,7 +161,7 @@ def _sanitize_url(url) -> str:
160161 return:
161162 str either sanitized or as entered depending on pattern match.
162163 """
163- pattern = "(.*https?://)(\w+:\w+)@(\w+\..*)"
164+ pattern = r "(.*https?://)(\w+:\w+)@(\w+\..*)"
164165 m = re .match (pattern , url )
165166 if m :
166167 newurl = f"{ m .group (1 )} *****:*****@{ m .group (3 )} "
You can’t perform that action at this time.
0 commit comments