From 51e25abe4beb40a019c2aa9bc1d8e38721033077 Mon Sep 17 00:00:00 2001 From: Egor Kostan <20955183+ikostan@users.noreply.github.com> Date: Fri, 13 Dec 2024 01:30:07 -0800 Subject: [PATCH] anagrams --- kyu_5/where_my_anagrams_at/__init__.py | 1 + kyu_5/where_my_anagrams_at/anagrams.py | 5 ++++- kyu_5/where_my_anagrams_at/test_anagrams.py | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/kyu_5/where_my_anagrams_at/__init__.py b/kyu_5/where_my_anagrams_at/__init__.py index e69de29bb2d..f2e986065b5 100644 --- a/kyu_5/where_my_anagrams_at/__init__.py +++ b/kyu_5/where_my_anagrams_at/__init__.py @@ -0,0 +1 @@ +"""Where my anagrams at.""" diff --git a/kyu_5/where_my_anagrams_at/anagrams.py b/kyu_5/where_my_anagrams_at/anagrams.py index 40971098561..95d16300500 100644 --- a/kyu_5/where_my_anagrams_at/anagrams.py +++ b/kyu_5/where_my_anagrams_at/anagrams.py @@ -1,5 +1,6 @@ """ -Solution for -> Where my anagrams at? +Solution for -> Where my anagrams at?. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -7,6 +8,8 @@ def anagrams(word, words) -> list: """ + anagrams function. + A function that will find all the anagrams of a word from a list. You will be given two inputs a word and an array with words. You should return an array of all diff --git a/kyu_5/where_my_anagrams_at/test_anagrams.py b/kyu_5/where_my_anagrams_at/test_anagrams.py index 537b6139778..024ffb791b3 100644 --- a/kyu_5/where_my_anagrams_at/test_anagrams.py +++ b/kyu_5/where_my_anagrams_at/test_anagrams.py @@ -1,5 +1,6 @@ """ -Solution for -> Where my anagrams at? +Test suite for -> Where my anagrams at?. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -26,12 +27,12 @@ name='Source/Kata') # pylint: enable=R0801 class AnagramsTestCase(unittest.TestCase): - """ - Testing anagrams function - """ + """Testing anagrams function.""" def test_anagrams(self): """ + Testing anagrams function with various test data. + Test a function that will find all the anagrams of a word from a list. You will be given two inputs a word and an array with words. You should return an array of all the anagrams or an empty array if there are none.