Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush stdout when asking word fix #2642

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Flush stdout when asking word fix
adrien-berchet committed Dec 16, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit eb8af1d93041040d19ab05924d4c174944c38d54
1 change: 1 addition & 0 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
@@ -694,6 +694,7 @@ def ask_for_word_fix(
fixword = fix_case(wrongword, misspelling.data)
while not r:
print(f"{line}\t{wrongword} ==> {fixword} (Y/n) ", end="")
sys.stdout.flush()
r = sys.stdin.readline().strip().upper()
if not r:
r = "Y"