Dont use mutable objects as default arguments

This commit is contained in:
Philipp Hörist 2017-12-03 15:34:33 +01:00
parent 086eeb3dc8
commit 47f1f41977
2 changed files with 4 additions and 2 deletions

View File

@ -913,7 +913,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
self.received_history_pos = pos
def print_conversation_line(self, text, kind, name, tim,
other_tags_for_name=[], other_tags_for_time=[], other_tags_for_text=[],
other_tags_for_name=None, other_tags_for_time=None, other_tags_for_text=None,
count_as_new=True, subject=None, old_kind=None, xhtml=None, simple=False,
xep0184_id=None, graphics=True, displaymarking=None, msg_log_id=None,
msg_stanza_id=None, correct_id=None, additional_data=None,

View File

@ -1353,11 +1353,13 @@ class ConversationTextview(GObject.GObject):
buffer_.insert(end_iter, subject)
self.print_empty_line(end_iter)
def print_real_text(self, text, text_tags=[], name=None, xhtml=None,
def print_real_text(self, text, text_tags=None, name=None, xhtml=None,
graphics=True, mark=None, additional_data=None):
"""
Add normal and special text. call this to add text
"""
if text_tags is None:
text_tags = []
if additional_data is None:
additional_data = {}
buffer_ = self.tv.get_buffer()