From 29da3436ee0f302b7107718c9382144474d0b0a1 Mon Sep 17 00:00:00 2001 From: Umar Farooq Ghumman Date: Thu, 9 Nov 2023 08:50:50 -0600 Subject: [PATCH] updated sphinx directory naming script --- docs/replace_sphinx_dir.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/replace_sphinx_dir.py b/docs/replace_sphinx_dir.py index 2e6e12b68..d9a91b866 100644 --- a/docs/replace_sphinx_dir.py +++ b/docs/replace_sphinx_dir.py @@ -4,7 +4,7 @@ search_directory = "../" # Define the word to search for and the replacement -search_word = "/project/data/VerticaPy/docs" +search_word = "SPHINX_DIRECTORY" replacement_word = "/project/data/VerticaPy/docs" @@ -21,10 +21,8 @@ def search_replace_in_file(file_path): # Recursively search for Python files and perform the search and replace for root, dirs, files in os.walk(search_directory): for file in files: - if ( - file.endswith(".py") - or file.endswith(".rst") - and not file.endswith("replace_sphinx_dir.py") + if (file.endswith(".py") or file.endswith(".rst")) and not file.endswith( + "replace_sphinx_dir.py" ): file_path = os.path.join(root, file) search_replace_in_file(file_path)