aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
diff options
context:
space:
mode:
authorNikita Slyusarev <nslus@yandex-team.com>2022-02-10 16:46:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:53 +0300
commit469afdc4e2587bf62ecdd096b75a0baa444c4012 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
parentcd77cecfc03a3eaf87816af28a33067c4f0cdb59 (diff)
downloadydb-469afdc4e2587bf62ecdd096b75a0baa444c4012.tar.gz
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py')
-rw-r--r--contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py114
1 files changed, 57 insertions, 57 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
index b863abc908..072fb0677f 100644
--- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
+++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
@@ -4,7 +4,7 @@ Interface for an output.
from __future__ import unicode_literals
from abc import ABCMeta, abstractmethod
from six import with_metaclass
-from prompt_toolkit.layout.screen import Size
+from prompt_toolkit.layout.screen import Size
__all__ = (
'Output',
@@ -21,19 +21,19 @@ class Output(with_metaclass(ABCMeta, object)):
:class:`~prompt_toolkit.terminal.win32_output.Win32Output`.
"""
@abstractmethod
- def fileno(self):
- " Return the file descriptor to which we can write for the output. "
-
- @abstractmethod
- def encoding(self):
- """
- Return the encoding for this output, e.g. 'utf-8'.
- (This is used mainly to know which characters are supported by the
- output the data, so that the UI can provide alternatives, when
- required.)
- """
-
- @abstractmethod
+ def fileno(self):
+ " Return the file descriptor to which we can write for the output. "
+
+ @abstractmethod
+ def encoding(self):
+ """
+ Return the encoding for this output, e.g. 'utf-8'.
+ (This is used mainly to know which characters are supported by the
+ output the data, so that the UI can provide alternatives, when
+ required.)
+ """
+
+ @abstractmethod
def write(self, data):
" Write text (Terminal escape sequences will be removed/escaped.) "
@@ -147,46 +147,46 @@ class Output(with_metaclass(ABCMeta, object)):
def disable_bracketed_paste(self):
" For vt100 only. "
-
-
-class DummyOutput(Output):
- """
- For testing. An output class that doesn't render anything.
- """
- def fileno(self):
- " There is no sensible default for fileno(). "
- raise NotImplementedError
-
- def encoding(self):
- return 'utf-8'
-
- def write(self, data): pass
- def write_raw(self, data): pass
- def set_title(self, title): pass
- def clear_title(self): pass
- def flush(self): pass
- def erase_screen(self): pass
- def enter_alternate_screen(self): pass
- def quit_alternate_screen(self): pass
- def enable_mouse_support(self): pass
- def disable_mouse_support(self): pass
- def erase_end_of_line(self): pass
- def erase_down(self): pass
- def reset_attributes(self): pass
- def set_attributes(self, attrs): pass
- def disable_autowrap(self): pass
- def enable_autowrap(self): pass
- def cursor_goto(self, row=0, column=0): pass
- def cursor_up(self, amount): pass
- def cursor_down(self, amount): pass
- def cursor_forward(self, amount): pass
- def cursor_backward(self, amount): pass
- def hide_cursor(self): pass
- def show_cursor(self): pass
- def ask_for_cpr(self): pass
- def bell(self): pass
- def enable_bracketed_paste(self): pass
- def disable_bracketed_paste(self): pass
-
- def get_size(self):
- return Size(rows=40, columns=80)
+
+
+class DummyOutput(Output):
+ """
+ For testing. An output class that doesn't render anything.
+ """
+ def fileno(self):
+ " There is no sensible default for fileno(). "
+ raise NotImplementedError
+
+ def encoding(self):
+ return 'utf-8'
+
+ def write(self, data): pass
+ def write_raw(self, data): pass
+ def set_title(self, title): pass
+ def clear_title(self): pass
+ def flush(self): pass
+ def erase_screen(self): pass
+ def enter_alternate_screen(self): pass
+ def quit_alternate_screen(self): pass
+ def enable_mouse_support(self): pass
+ def disable_mouse_support(self): pass
+ def erase_end_of_line(self): pass
+ def erase_down(self): pass
+ def reset_attributes(self): pass
+ def set_attributes(self, attrs): pass
+ def disable_autowrap(self): pass
+ def enable_autowrap(self): pass
+ def cursor_goto(self, row=0, column=0): pass
+ def cursor_up(self, amount): pass
+ def cursor_down(self, amount): pass
+ def cursor_forward(self, amount): pass
+ def cursor_backward(self, amount): pass
+ def hide_cursor(self): pass
+ def show_cursor(self): pass
+ def ask_for_cpr(self): pass
+ def bell(self): pass
+ def enable_bracketed_paste(self): pass
+ def disable_bracketed_paste(self): pass
+
+ def get_size(self):
+ return Size(rows=40, columns=80)