Replace list() with [] everywhere.

This commit is contained in:
Emmanuel Gil Peyrot 2018-07-22 18:26:50 +02:00
parent f107ecd953
commit 4a01e073ae
2 changed files with 5 additions and 5 deletions

View file

@ -569,7 +569,7 @@ class ChatTab(Tab):
""" """
# build the list of the recent words # build the list of the recent words
char_we_dont_want = string.punctuation + ' ’„“”…«»' char_we_dont_want = string.punctuation + ' ’„“”…«»'
words = list() words = []
for msg in self._text_buffer.messages[:-40:-1]: for msg in self._text_buffer.messages[:-40:-1]:
if not msg: if not msg:
continue continue

View file

@ -583,7 +583,7 @@ class HistoryInput(Input):
An input with colors and stuff, plus an history An input with colors and stuff, plus an history
^R allows to search inside the history (as in a shell) ^R allows to search inside the history (as in a shell)
""" """
history = list() history = []
def __init__(self): def __init__(self):
Input.__init__(self) Input.__init__(self)
@ -593,7 +593,7 @@ class HistoryInput(Input):
self.key_func['^R'] = self.toggle_search self.key_func['^R'] = self.toggle_search
self.search = False self.search = False
if config.get('separate_history'): if config.get('separate_history'):
self.history = list() self.history = []
def toggle_search(self): def toggle_search(self):
if self.help_message: if self.help_message:
@ -669,7 +669,7 @@ class MessageInput(HistoryInput):
Conversation, Muc and Private tabs Conversation, Muc and Private tabs
Also letting the user enter colors or other text markups Also letting the user enter colors or other text markups
""" """
history = list() # The history is common to all MessageInput history = [] # The history is common to all MessageInput
def __init__(self): def __init__(self):
HistoryInput.__init__(self) HistoryInput.__init__(self)
@ -716,7 +716,7 @@ class CommandInput(HistoryInput):
HelpMessage when a command is started HelpMessage when a command is started
The on_input callback The on_input callback
""" """
history = list() history = []
def __init__(self, help_message, on_abort, on_success, on_input=None): def __init__(self, help_message, on_abort, on_success, on_input=None):
HistoryInput.__init__(self) HistoryInput.__init__(self)