diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-24 16:28:55 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-24 16:28:55 +0200 |
commit | cce1a4090a832a6fd2b7be4c610e469efb480b15 (patch) | |
tree | 1b44258871d331e9df9c6cadaea07b61468af9ff /poezio/windows/inputs.py | |
parent | d967c246c8168d923fd3c3e5ada28d49f9d3ee8e (diff) | |
download | poezio-cce1a4090a832a6fd2b7be4c610e469efb480b15.tar.gz poezio-cce1a4090a832a6fd2b7be4c610e469efb480b15.tar.bz2 poezio-cce1a4090a832a6fd2b7be4c610e469efb480b15.tar.xz poezio-cce1a4090a832a6fd2b7be4c610e469efb480b15.zip |
Add __slots__ in most of the poezio.windows classes, to be more explicit about their data.
Diffstat (limited to 'poezio/windows/inputs.py')
-rw-r--r-- | poezio/windows/inputs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py index 6b0bc798..c0c73419 100644 --- a/poezio/windows/inputs.py +++ b/poezio/windows/inputs.py @@ -32,6 +32,9 @@ class Input(Win): passing the list of items that can be used to complete. The completion can be used in a very flexible way. """ + __slots__ = ('key_func', 'text', 'pos', 'view_pos', 'on_input', 'color', + 'last_completion', 'hit_list') + text_attributes = 'bou1234567ti' clipboard = '' # A common clipboard for all the inputs, this makes @@ -586,6 +589,8 @@ class HistoryInput(Input): An input with colors and stuff, plus an history ^R allows to search inside the history (as in a shell) """ + __slots__ = ('help_message', 'histo_pos', 'current_completed', 'search') + history = [] # type: List[str] def __init__(self) -> None: |