From 1fab540710593e487f66aa7daaa5fec07aa00f3d Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Sat, 5 Oct 2024 20:20:01 +0200 Subject: [PATCH] Move path to defined variable --- src/scribe_data/wikidata/query_data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scribe_data/wikidata/query_data.py b/src/scribe_data/wikidata/query_data.py index 08260920..4e92c789 100644 --- a/src/scribe_data/wikidata/query_data.py +++ b/src/scribe_data/wikidata/query_data.py @@ -219,9 +219,13 @@ def query_data(languages=None, word_types=None, overwrite=None): json.dump(results_final, json_file, ensure_ascii=False, indent=0) # Call the corresponding formatting file. - os.system( - f'python3 "{PATH_TO_LANGUAGE_EXTRACTION_FILES / lang / target_type / f"format_{target_type}.py"}"' + formatting_file_path = ( + PATH_TO_LANGUAGE_EXTRACTION_FILES + / lang + / target_type + / f"format_{target_type}.py" ) + os.system(f"python3 {formatting_file_path}") with open( Path("scribe_data_json_export")