mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
style: auto-fix linting issues
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
220457e546
commit
8d5b81edc3
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue