From 67ae32043879daf9ae157c7c0a9cdee7d267bd47 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 24 Dec 2011 11:57:43 +0100 Subject: [PATCH] Replace calls to "apply(f, args)" with "f(*args)" --- src/qweechat/about.py | 2 +- src/qweechat/buffer.py | 10 +++++----- src/qweechat/chat.py | 2 +- src/qweechat/connection.py | 2 +- src/qweechat/debug.py | 2 +- src/qweechat/network.py | 2 +- src/qweechat/qweechat.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qweechat/about.py b/src/qweechat/about.py index e010c8a..2f1b0a2 100644 --- a/src/qweechat/about.py +++ b/src/qweechat/about.py @@ -32,7 +32,7 @@ class AboutDialog(QtGui.QDialog): """About dialog.""" def __init__(self, name, messages, *args): - apply(QtGui.QDialog.__init__, (self,) + args) + QtGui.QDialog.__init__(*(self,) + args) self.setModal(True) self.setWindowTitle(name) diff --git a/src/qweechat/buffer.py b/src/qweechat/buffer.py index 3999b6a..fc12d09 100644 --- a/src/qweechat/buffer.py +++ b/src/qweechat/buffer.py @@ -34,7 +34,7 @@ class GenericListWidget(QtGui.QListWidget): """Generic QListWidget with dynamic size.""" def __init__(self, *args): - apply(QtGui.QListWidget.__init__, (self,) + args) + QtGui.QListWidget.__init__(*(self,) + args) self.setMaximumWidth(100) self.setTextElideMode(QtCore.Qt.ElideNone) self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) @@ -52,17 +52,17 @@ class GenericListWidget(QtGui.QListWidget): def clear(self, *args): """Re-implement clear to set dynamic size after clear.""" - apply(QtGui.QListWidget.clear, (self,) + args) + QtGui.QListWidget.clear(*(self,) + args) self.auto_resize() def addItem(self, *args): """Re-implement addItem to set dynamic size after add.""" - apply(QtGui.QListWidget.addItem, (self,) + args) + QtGui.QListWidget.addItem(*(self,) + args) self.auto_resize() def insertItem(self, *args): """Re-implement insertItem to set dynamic size after insert.""" - apply(QtGui.QListWidget.insertItem, (self,) + args) + QtGui.QListWidget.insertItem(*(self,) + args) self.auto_resize() @@ -70,7 +70,7 @@ class BufferListWidget(GenericListWidget): """Widget with list of buffers.""" def __init__(self, *args): - apply(GenericListWidget.__init__, (self,) + args) + GenericListWidget.__init__(*(self,) + args) def switch_prev_buffer(self): if self.currentRow() > 0: diff --git a/src/qweechat/chat.py b/src/qweechat/chat.py index e212db2..9763191 100644 --- a/src/qweechat/chat.py +++ b/src/qweechat/chat.py @@ -35,7 +35,7 @@ class ChatTextEdit(QtGui.QTextEdit): """Chat area.""" def __init__(self, debug, *args): - apply(QtGui.QTextEdit.__init__, (self,) + args) + QtGui.QTextEdit.__init__(*(self,) + args) self.debug = debug self.readOnly = True self.setFocusPolicy(QtCore.Qt.NoFocus) diff --git a/src/qweechat/connection.py b/src/qweechat/connection.py index d0b5939..72dcd3e 100644 --- a/src/qweechat/connection.py +++ b/src/qweechat/connection.py @@ -31,7 +31,7 @@ class ConnectionDialog(QtGui.QDialog): """Connection window with server/port/password fields.""" def __init__(self, values, *args): - apply(QtGui.QDialog.__init__, (self,) + args) + QtGui.QDialog.__init__(*(self,) + args) self.values = values self.setModal(True) diff --git a/src/qweechat/debug.py b/src/qweechat/debug.py index c38b2f0..0bda0f1 100644 --- a/src/qweechat/debug.py +++ b/src/qweechat/debug.py @@ -33,7 +33,7 @@ class DebugDialog(QtGui.QDialog): """Debug dialog.""" def __init__(self, *args): - apply(QtGui.QDialog.__init__, (self,) + args) + QtGui.QDialog.__init__(*(self,) + args) self.resize(640, 480) self.setWindowTitle('Debug console') diff --git a/src/qweechat/network.py b/src/qweechat/network.py index e73d58a..43d8c84 100644 --- a/src/qweechat/network.py +++ b/src/qweechat/network.py @@ -43,7 +43,7 @@ class Network(QtCore.QObject): messageFromWeechat = qt_compat.Signal(QtCore.QByteArray) def __init__(self, *args): - apply(QtCore.QObject.__init__, (self,) + args) + QtCore.QObject.__init__(*(self,) + args) self.status_disconnected = 'disconnected' self.status_connecting = 'connecting...' self.status_connected = 'connected' diff --git a/src/qweechat/qweechat.py b/src/qweechat/qweechat.py index e392b97..1c3bb6b 100755 --- a/src/qweechat/qweechat.py +++ b/src/qweechat/qweechat.py @@ -55,7 +55,7 @@ class MainWindow(QtGui.QMainWindow): """Main window.""" def __init__(self, *args): - apply(QtGui.QMainWindow.__init__, (self,) + args) + QtGui.QMainWindow.__init__(*(self,) + args) self.config = config.read()