From 3d69841a08d055240f13c24078e615fe35f046a6 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Fri, 5 Jul 2024 23:46:10 +0800 Subject: [PATCH] change load_exemplars to desired format, pass flake8 and regolith test. --- regolith/schemas.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/regolith/schemas.py b/regolith/schemas.py index c192520fb..40dd4fd47 100644 --- a/regolith/schemas.py +++ b/regolith/schemas.py @@ -151,9 +151,8 @@ def load_schemas(): def load_exemplars(): here = Path(__file__).parent exemplar_file = here / "exemplars.json" - with open(exemplar_file, "r", encoding="utf-8") as exemplar_file: - raw_exemplars = json.load(exemplar_file) - exemplars = raw_exemplars + with open(exemplar_file, "r", encoding="utf-8") as efile: + exemplars = json.load(efile) return exemplars