From bb81e8fbee8a62d42f20e572d5156d25edbfb641 Mon Sep 17 00:00:00 2001 From: Nezar Abdennur Date: Sun, 10 Nov 2024 10:53:10 -0500 Subject: [PATCH] Replace additional deprecated syntax --- src/higlass_schema/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/higlass_schema/cli.py b/src/higlass_schema/cli.py index e70369f..f11f4d2 100644 --- a/src/higlass_schema/cli.py +++ b/src/higlass_schema/cli.py @@ -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."