From ddd79577e8115d680efc7a39c50951aa65c57e3a Mon Sep 17 00:00:00 2001 From: Zann <141020257+Fauzanhandriansyah@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:35:14 +0700 Subject: [PATCH 1/5] docs: fix typos and improve description in anagrams.py Added a brief definition of what an anagram is in the docstring to make the documentation clearer for beginners. --- strings/anagrams.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/strings/anagrams.py b/strings/anagrams.py index 71cc142fb2ad..9e35863e2112 100644 --- a/strings/anagrams.py +++ b/strings/anagrams.py @@ -24,7 +24,11 @@ def signature(word: str) -> str: def anagram(my_word: str) -> list[str]: """ + An anagram is a word or phrase formed by rearranging the letters of a different + word or phrase, typically using all the original letters exactly once. + Return every anagram of the given word from the dictionary. + >>> anagram('test') ['sett', 'stet', 'test'] From 1ed768299e228766009968d665e04a4a259fd78c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 01:41:39 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- strings/anagrams.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/anagrams.py b/strings/anagrams.py index 9e35863e2112..0da2dbf9744d 100644 --- a/strings/anagrams.py +++ b/strings/anagrams.py @@ -26,9 +26,9 @@ def anagram(my_word: str) -> list[str]: """ An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. - + Return every anagram of the given word from the dictionary. - + >>> anagram('test') ['sett', 'stet', 'test'] From 70ee140522029c69068e09c42928e4fc443e864b Mon Sep 17 00:00:00 2001 From: Zann <141020257+Fauzanhandriansyah@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:52:51 +0700 Subject: [PATCH 3/5] docs: fix formatting and indentation for ruff --- strings/anagrams.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/strings/anagrams.py b/strings/anagrams.py index 0da2dbf9744d..31a34614e985 100644 --- a/strings/anagrams.py +++ b/strings/anagrams.py @@ -23,13 +23,12 @@ def signature(word: str) -> str: def anagram(my_word: str) -> list[str]: - """ - An anagram is a word or phrase formed by rearranging the letters of a different - word or phrase, typically using all the original letters exactly once. - - Return every anagram of the given word from the dictionary. - +""" +An anagram is a word or phrase formed by rearranging the letters of +a different word or phrase, typically using all the original letters +exactly once. +Return every anagram of the given word from the dictionary. >>> anagram('test') ['sett', 'stet', 'test'] >>> anagram('this is a test') From a3db57000725e5a814815ff948cc117fa00f2401 Mon Sep 17 00:00:00 2001 From: Zann <141020257+Fauzanhandriansyah@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:59:01 +0700 Subject: [PATCH 4/5] Update anagrams.py --- strings/anagrams.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/strings/anagrams.py b/strings/anagrams.py index 31a34614e985..fada5cb386bb 100644 --- a/strings/anagrams.py +++ b/strings/anagrams.py @@ -24,11 +24,11 @@ def signature(word: str) -> str: def anagram(my_word: str) -> list[str]: """ -An anagram is a word or phrase formed by rearranging the letters of -a different word or phrase, typically using all the original letters -exactly once. + An anagram is a word or phrase formed by rearranging the letters of a + different word or phrase, typically using all the original letters exactly + once. -Return every anagram of the given word from the dictionary. + Return every anagram of the given word from the dictionary. >>> anagram('test') ['sett', 'stet', 'test'] >>> anagram('this is a test') From 890ffda11444a746512875fefff03fc2072d2b82 Mon Sep 17 00:00:00 2001 From: Zann <141020257+Fauzanhandriansyah@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:02:53 +0700 Subject: [PATCH 5/5] Update anagrams.py --- strings/anagrams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/anagrams.py b/strings/anagrams.py index fada5cb386bb..6bd6da90be70 100644 --- a/strings/anagrams.py +++ b/strings/anagrams.py @@ -23,7 +23,7 @@ def signature(word: str) -> str: def anagram(my_word: str) -> list[str]: -""" + """ An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.