Skip to content

Commit

Permalink
Fix action (#183)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Lextuga007 authored Dec 14, 2024
1 parent 7b64801 commit b4238d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/no-bad-latin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/pull_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ 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:
pr_num {str} -- Number of the Pull Request to get modified files from
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.
Expand Down

0 comments on commit b4238d4

Please sign in to comment.