Skip to content

Commit c2df9c6

Browse files
committed
Initial Code
1 parent dfae05b commit c2df9c6

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎o2j/contracttests.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
from o2j import security
2626
from o2j.models import GenerationPlan, PlannedOperation
27-
from o2j.samples import Sampler, SampleError
27+
from o2j.samples import SampleError, Sampler
2828
from o2j.stages.plan import is_typed_param
2929

3030
JSON_TYPES = ("application/json", "application/problem+json")
@@ -433,9 +433,7 @@ def _j(text: str | None) -> str:
433433
out.append("\\r")
434434
elif ch == "\t":
435435
out.append("\\t")
436-
elif ord(ch) < 0x20 or ord(ch) > 0x7E:
437-
out.append(f"\\u{ord(ch):04x}")
438-
elif ch in "{}" and escape_braces:
436+
elif ord(ch) < 0x20 or ord(ch) > 0x7E or (ch in "{}" and escape_braces):
439437
out.append(f"\\u{ord(ch):04x}")
440438
else:
441439
out.append(ch)

‎o2j/stages/verify.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import json
1919
import tempfile
2020
from pathlib import Path
21-
2221
from typing import Any
2322

2423
from o2j import conformance

0 commit comments

Comments
 (0)