Skip to content

Commit 371189a

Browse files
Simplify code
The list comprehension is shorter than the map() version. I feel it is also simpler, although that is debatable. This is consistent with the previous commit.
1 parent 22cb24e commit 371189a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codespell_lib/_codespell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def ask_for_word_fix(line, wrongword, misspelling, interactivity):
527527
# we ask the user which word to use
528528

529529
r = ''
530-
opt = list(map(lambda x: x.strip(), misspelling.data.split(',')))
530+
opt = [w.strip() for w in misspelling.data.split(",")]
531531
while not r:
532532
print("%s Choose an option (blank for none): " % line, end='')
533533
for i in range(len(opt)):

0 commit comments

Comments
 (0)