From b4238d4394d85a71730c9ecb7cef45e21863b84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Turner?= Date: Sat, 14 Dec 2024 17:00:11 +0000 Subject: [PATCH] Fix action (#183) * Remove start_phrase as files not in folders * Updated style.md to styles_guide.qmd * Added e.g. to file * Added no-bad-latin.py to ignore_list * Updated ignore_list and bad_latin * Removed bad latin --- tests/no-bad-latin.py | 4 ++-- tests/pull_files.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/no-bad-latin.py b/tests/no-bad-latin.py index 3d3ce8a..1ec7bff 100644 --- a/tests/no-bad-latin.py +++ b/tests/no-bad-latin.py @@ -9,7 +9,7 @@ HERE = os.getcwd() ABSOLUTE_HERE = os.path.dirname(HERE) -IGNORE_LIST = ["config.yml", "style.md", "contributors-record.md", "references.bib"] +IGNORE_LIST = ["no-bad-latin.py", "references.bib"] def parse_args(): @@ -93,7 +93,7 @@ def read_and_check_files(files): containing the offending line. """ failing_files = {} - bad_latin = ["i.e.", "e.g.", "e.t.c.", " etc", " ie ", "et cetera"] + bad_latin = ["i.e.", "e.g.", "e.t.c.", " etc", " ie ", "et cetera", " eg ", " ect "] for filename in files: if os.path.basename(filename) in IGNORE_LIST: diff --git a/tests/pull_files.py b/tests/pull_files.py index 8539a5f..8322d0b 100644 --- a/tests/pull_files.py +++ b/tests/pull_files.py @@ -43,7 +43,7 @@ def get_files_from_pr(pr_num): return files -def filter_files(pr_num, start_phrase="book/website", ignore_suffix=None): +def filter_files(pr_num, start_phrase="", ignore_suffix=None): """Filter modified files from a Pull Request by a start phrase Arguments: @@ -51,7 +51,7 @@ def filter_files(pr_num, start_phrase="book/website", ignore_suffix=None): Keyword Arguments: start_phrase {str} -- Start phrase to filter changed files by - (default: {"book/website"}) + (default: {""}) ignore_suffix {str} -- File suffix or tuple of suffixes to ignore.