Skip to content

Commit a7a7f7f

Browse files
committed
Fix formatting
1 parent 628ff57 commit a7a7f7f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

debug-python-errors/palindromes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ def find_palindromes(text):
33
words = text.split()
44

55
# Remove punctuation and convert to lowercase
6-
normalized_words = ["".join(filter(str.isalnum, word)).lower() for word in words]
6+
normalized_words = [
7+
"".join(filter(str.isalnum, word)).lower() for word in words
8+
]
79

810
# Check for palindromes
911
return [word for word in normalized_words if word == word[::-1]]
1012

1113

1214
if __name__ == "__main__":
13-
print(find_palindromes("Dad plays many solos at noon, and sees a racecar."))
15+
print(
16+
find_palindromes("Dad plays many solos at noon, and sees a racecar.")
17+
)

debug-python-errors/test_fruit.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ def test_uppercase_list(self):
2424

2525
def test_mixed_case_list(self):
2626
"""with mixed case strings"""
27-
self.assertEqual(capitalize_fruit_names(["mAnGo", "grApE"]), ["Mango", "Grape"])
27+
self.assertEqual(
28+
capitalize_fruit_names(["mAnGo", "grApE"]), ["Mango", "Grape"]
29+
)
2830

2931
def test_non_string_element(self):
3032
"""with a mix of integer and string elements"""
31-
self.assertEqual(capitalize_fruit_names([123, "banana"]), ["", "Banana"])
33+
self.assertEqual(
34+
capitalize_fruit_names([123, "banana"]), ["", "Banana"]
35+
)
3236

3337

3438
if __name__ == "__main__":

0 commit comments

Comments
 (0)