style: auto-fix linting issues

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude[bot] 2026-04-10 11:33:48 +00:00
parent 220457e546
commit 8d5b81edc3

View file

@ -53,19 +53,19 @@ def normalize_trace_id(trace_id: str) -> str | None:
suffix = trace_id[-4:]
if suffix == "EXP0" or suffix == "EXP1":
trace_id = trace_id[:-4] + "0000"
if len(trace_id) != 36 or trace_id[8] != "-" or trace_id[13] != "-" or trace_id[18] != "-" or trace_id[23] != "-":
return None
if trace_id[14] != "4" or trace_id[19] not in "89ab":
return None
# Check all non-hyphen characters are lowercase hex
for i, ch in enumerate(trace_id):
if i in (8, 13, 18, 23):
continue
if ch not in _HEX_CHARS:
return None
return trace_id