Skip to content

Commit

Permalink
Replace additional deprecated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Nov 10, 2024
1 parent e45febf commit bb81e8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/higlass_schema/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ def check(args: argparse.Namespace) -> None:
try:
if args.path == "-":
raw = "\n".join(sys.stdin.readlines())
Viewconf[View[Track]].parse_raw(raw)
Viewconf[View[Track]].model_validate_json(raw)
else:
Viewconf[View[Track]].parse_file(args.path)
with open(args.path, 'r') as file:
raw = file.read()
Viewconf[View[Track]].model_validate_json(raw)
console.print("✅ valid viewconf.", style="green")
except ValidationError:
msg = "❌ Invalid viewconf."
Expand Down

0 comments on commit bb81e8f

Please sign in to comment.