mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
Merge pull request #4046 from strokirk/fix-redirectstream-iobase
python: Add missing I/O methods to RedirectStream
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
"""Legacy python/python3-vim emulation."""
|
||||
import imp
|
||||
import io
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
@ -151,7 +152,7 @@ class ScriptHost(object):
|
||||
current.range = current.buffer.range(start, stop)
|
||||
|
||||
|
||||
class RedirectStream(object):
|
||||
class RedirectStream(io.IOBase):
|
||||
def __init__(self, redirect_handler):
|
||||
self.redirect_handler = redirect_handler
|
||||
|
||||
@ -161,9 +162,6 @@ class RedirectStream(object):
|
||||
def writelines(self, seq):
|
||||
self.redirect_handler('\n'.join(seq))
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
|
||||
|
||||
class LegacyEvalHook(neovim.SessionHook):
|
||||
|
||||
|
Reference in New Issue
Block a user