From 92a08205d05e98a54215d8b2ffeadd19a01cfd3d Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Mon, 31 Oct 2022 11:04:36 +0100 Subject: [PATCH] Remove unnecessary path check Simplifies getting the tag base path. Also fixes #55 --- scripts/tag_autocomplete_helper.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index 8be7049..e4e5dcd 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -11,17 +11,7 @@ FILE_DIR = Path().absolute() EXT_PATH = FILE_DIR.joinpath('extensions') # Tags base path - - -def get_tags_base_path(): - script_path = Path(scripts.basedir()) - if (script_path.is_relative_to(EXT_PATH)): - return script_path.joinpath('tags') - else: - return FILE_DIR.joinpath('tags') - - -TAGS_PATH = get_tags_base_path() +TAGS_PATH = Path(scripts.basedir()).joinpath('tags') # The path to the folder containing the wildcards and embeddings WILDCARD_PATH = FILE_DIR.joinpath('scripts/wildcards')