From 0ee8f792e3105cda122ecb8696575eb0354b09bb Mon Sep 17 00:00:00 2001 From: algobytewise Date: Mon, 22 Mar 2021 16:10:23 +0530 Subject: [PATCH] Moved "other/anagrams.py" to the string folder (#4289) * move&rename, changed code accordingly * adjusted codespell ignore-list --- .pre-commit-config.yaml | 4 ++-- {other => strings}/anagrams.py | 2 +- other/words => strings/words.txt | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {other => strings}/anagrams.py (95%) rename other/words => strings/words.txt (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee422e61a..b48da86ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,12 +43,12 @@ repos: - id: codespell args: - --ignore-words-list=ans,crate,fo,followings,hist,iff,mater,secant,som,tim - - --skip="./.*,./strings/dictionary.txt,./other/words,./project_euler/problem_022/p022_names.txt" + - --skip="./.*,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt" - --quiet-level=2 exclude: | (?x)^( strings/dictionary.txt | - other/words | + strings/words.txt | project_euler/problem_022/p022_names.txt )$ - repo: local diff --git a/other/anagrams.py b/strings/anagrams.py similarity index 95% rename from other/anagrams.py rename to strings/anagrams.py index 0be013d5b..1a7c675d6 100644 --- a/other/anagrams.py +++ b/strings/anagrams.py @@ -6,7 +6,7 @@ import time start_time = time.time() print("creating word list...") path = os.path.split(os.path.realpath(__file__)) -with open(path[0] + "/words") as f: +with open(path[0] + "/words.txt") as f: word_list = sorted(list({word.strip().lower() for word in f})) diff --git a/other/words b/strings/words.txt similarity index 100% rename from other/words rename to strings/words.txt