Moved "other/anagrams.py" to the string folder (#4289)

* move&rename, changed code accordingly

* adjusted codespell ignore-list
This commit is contained in:
algobytewise 2021-03-22 16:10:23 +05:30 committed by GitHub
parent ce99859ad5
commit 0ee8f792e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -43,12 +43,12 @@ repos:
- id: codespell - id: codespell
args: args:
- --ignore-words-list=ans,crate,fo,followings,hist,iff,mater,secant,som,tim - --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 - --quiet-level=2
exclude: | exclude: |
(?x)^( (?x)^(
strings/dictionary.txt | strings/dictionary.txt |
other/words | strings/words.txt |
project_euler/problem_022/p022_names.txt project_euler/problem_022/p022_names.txt
)$ )$
- repo: local - repo: local

View File

@ -6,7 +6,7 @@ import time
start_time = time.time() start_time = time.time()
print("creating word list...") print("creating word list...")
path = os.path.split(os.path.realpath(__file__)) 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})) word_list = sorted(list({word.strip().lower() for word in f}))