From c58279142fb22ac0ee46c8f80291d8cfe6916ffc Mon Sep 17 00:00:00 2001 From: algobytewise Date: Mon, 22 Mar 2021 15:56:59 +0530 Subject: [PATCH 1/2] move&rename, changed code accordingly --- {other => strings}/anagrams.py | 2 +- other/words => strings/words.txt | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {other => strings}/anagrams.py (95%) rename other/words => strings/words.txt (100%) diff --git a/other/anagrams.py b/strings/anagrams.py similarity index 95% rename from other/anagrams.py rename to strings/anagrams.py index 0be013d5bc47..1a7c675d6719 100644 --- a/other/anagrams.py +++ b/strings/anagrams.py @@ -6,7 +6,7 @@ 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 From 81a2faa03aab62f0c866f0cd389035adc5aa1e5b Mon Sep 17 00:00:00 2001 From: algobytewise Date: Mon, 22 Mar 2021 16:04:28 +0530 Subject: [PATCH 2/2] adjusted codespell ignore-list --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee422e61a03b..b48da86ee57d 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