make vim's python indent happy

This commit is contained in:
Kovid Goyal 2023-01-24 18:16:21 +05:30
parent 86041db5e4
commit c0db29016b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -21,12 +21,12 @@ def decode_msg(line: bytes) -> dict:
def develop_speech(text='Lucca brazzi sleeps with the fishes'): def develop_speech(text='Lucca brazzi sleeps with the fishes'):
p = start_pipe_worker('from calibre_extensions.winspeech import run_main_loop; run_main_loop()') p = start_pipe_worker('from calibre_extensions.winspeech import run_main_loop; run_main_loop()')
print('\x1b[32mSpeaking', text, '\x1b[39m', flush=True) # ]] print('\x1b[32mSpeaking', text, '\x1b[39m]]'[:-2], flush=True)
q = Queue() q = Queue()
def echo_output(p): def echo_output(p):
for line in p.stdout: for line in p.stdout:
sys.stdout.buffer.write(b'\x1b[33m' + line + b'\x1b[39m') # ]] sys.stdout.buffer.write(b'\x1b[33m' + line + b'\x1b[39m]]'[:-2])
sys.stdout.buffer.flush() sys.stdout.buffer.flush()
q.put(decode_msg(line)) q.put(decode_msg(line))