in elastic_transport/_models.py [0:0]
def _dict_hide_auth(self) -> Dict[str, str]:
def hide_auth(val: str) -> str:
# Hides only the authentication value, not the method.
match = re.match(r"^(ApiKey|Basic|Bearer) ", val)
if match:
return f"{match.group(1)} <hidden>"
return "<hidden>"
return {
key: hide_auth(val) if key.lower() == "authorization" else val
for key, val in self.items()
}