Commit bb545d54 authored by Philipp Hörist's avatar Philipp Hörist

Fix useless-object-inheritance pylint errors

parent 9e51ed8c
......@@ -64,7 +64,7 @@ def tree_model_pre_order(model, treeiter):
yield it
class AdvancedConfigurationWindow(object):
class AdvancedConfigurationWindow:
def __init__(self, transient):
self.xml = gtkgui_helpers.get_gtk_builder('advanced_configuration_window.ui')
self.window = self.xml.get_object('advanced_configuration_window')
......
......@@ -55,7 +55,7 @@ class CommandContainer(metaclass=Container):
"""
__metaclass__ = Container
class CommandProcessor(object):
class CommandProcessor:
"""
Command processor is an immediate command emitter. It does not
participate in the dispatching process directly, but must define a
......@@ -145,7 +145,7 @@ def list_commands(self):
commands = dict(commands)
return sorted(set(commands.values()), key=lambda k: k.__repr__())
class Command(object):
class Command:
def __init__(self, handler, *names, **properties):
self.handler = handler
......
......@@ -15,7 +15,7 @@
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
class Account(object):
class Account:
def __init__(self, name, contacts, gc_contacts):
self.name = name
......
......@@ -152,7 +152,7 @@ def sort_dataforms_key(dataform):
### Internal classes of this module
################################################################################
class AbstractClientCaps(object):
class AbstractClientCaps:
"""
Base class representing a client and its capabilities as advertised by a
caps tag in a presence
......@@ -282,7 +282,7 @@ def _is_hash_valid(self, identities, features, dataforms):
return False
class CapsCache(object):
class CapsCache:
"""
This object keeps the mapping between caps data and real disco features they
represent, and provides simple way to query that info
......@@ -295,7 +295,7 @@ def __init__(self, logger=None):
# client (hash method/hash pair)
self.__cache = {}
class CacheItem(object):
class CacheItem:
# __names is a string cache; every string long enough is given
# another object, and we will have plenty of identical long
# strings. therefore we can cache them
......
......@@ -32,7 +32,7 @@
if __name__ != "__main__":
raise ImportError(str(e))
class XMPPEntity(object):
class XMPPEntity:
"""
Base representation of entities in XMPP
"""
......
......@@ -90,7 +90,7 @@ def deleteFileProp(cls, file_prop):
del files_props[a, s]
class FileProp(object):
class FileProp:
def __init__(self, account, sid):
# Do not instantiate this class directly. Call FilesProp.getNeFileProp
......
......@@ -52,7 +52,7 @@
OUT_CORE = 100
OUT_POSTCORE = 110
class GlobalEventsDispatcher(object):
class GlobalEventsDispatcher:
def __init__(self):
self.handlers = {}
......
......@@ -43,7 +43,7 @@
logger = logging.getLogger('gajim.c.jingle')
class ConnectionJingle(object):
class ConnectionJingle:
"""
This object depends on that it is a part of Connection class.
"""
......
......@@ -22,7 +22,7 @@
log = logging.getLogger('gajim.c.multimedia_helpers')
class DeviceManager(object):
class DeviceManager:
def __init__(self):
self.devices = {}
......
......@@ -35,7 +35,7 @@
log.debug('python-keyring missing, falling back to plaintext storage')
class PasswordStorage(object):
class PasswordStorage:
"""Interface for password stores"""
def get_password(self, account_name):
"""Return the password for account_name, or None if not found."""
......
......@@ -25,7 +25,7 @@
from gajim.common import app
class AbstractPEP(object):
class AbstractPEP:
type_ = ''
namespace = ''
......
......@@ -450,7 +450,7 @@ def remove_other_servers(self, host_to_keep):
if sock.host != host_to_keep and sock.mode == 'server':
self.remove_sender_by_key(key)
class Socks5(object):
class Socks5:
def __init__(self, idlequeue, host, port, initiator, target, sid):
if host is not None:
try:
......
......@@ -294,7 +294,7 @@ def on_proxypass_entry_changed(self, widget):
app.config.set_per('proxies', proxy, 'pass', value)
class FakeDataForm(Gtk.Table, object):
class FakeDataForm(Gtk.Table):
"""
Class for forms that are in XML format <entry1>value1</entry1> infos in a
table {entry1: value1}
......
......@@ -36,7 +36,7 @@
import itertools
class DataFormWidget(Gtk.Alignment, object):
class DataFormWidget(Gtk.Alignment):
# "public" interface
"""
Data Form widget. Use like any other widget
......@@ -306,7 +306,7 @@ def on_down_button_clicked(self, widget):
def on_records_selection_changed(self, widget):
self.refresh_multiple_buttons()
class SingleForm(Gtk.Table, object):
class SingleForm(Gtk.Table):
"""
Widget that represent DATAFORM_SINGLE mode form. Because this is used not
only to display single forms, but to form input windows of multiple-type
......
......@@ -1583,7 +1583,7 @@ def on_timeout(self):
class VoIPCallReceivedDialog(object):
class VoIPCallReceivedDialog:
instances = {}
def __init__(self, account, contact_jid, sid, content_types):
self.instances[(contact_jid, sid)] = self
......
......@@ -205,7 +205,7 @@ def get_agent_address(jid, node = None):
else:
return str(jid)
class Closure(object):
class Closure:
"""
A weak reference to a callback with arguments as an object
......@@ -474,8 +474,7 @@ def _disco_items_error(self, from_, error):
del self._cbs[cbkey]
# object is needed so that @property works
class ServiceDiscoveryWindow(object):
class ServiceDiscoveryWindow:
"""
Class that represents the Services Discovery window
"""
......
......@@ -36,7 +36,7 @@
####################
class MessageControl(object):
class MessageControl:
"""
An abstract base widget that can embed in the Gtk.Notebook of a
MessageWindow
......
......@@ -41,7 +41,7 @@
####################
class MessageWindow(object):
class MessageWindow:
"""
Class for windows which contain message like things; chats, groupchats, etc
"""
......
......@@ -29,7 +29,7 @@
MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.'
class MusicTrackInfo(object):
class MusicTrackInfo:
__slots__ = ['title', 'album', 'artist', 'duration', 'track_number',
'paused']
......
......@@ -33,7 +33,7 @@
log = logging.getLogger('gajim.p.plugin')
class GajimPlugin(object):
class GajimPlugin:
'''
Base class for implementing Gajim plugins.
'''
......
......@@ -51,7 +51,7 @@ class Column(IntEnum):
ICON = 4
class PluginsWindow(object):
class PluginsWindow:
'''Class for Plugins window'''
@log_calls('PluginsWindow')
......
......@@ -39,7 +39,7 @@ class GajimPluginActivateException(Exception):
'''
pass
class log_calls(object):
class log_calls:
'''
Decorator class for functions to easily log when they are entered and left.
'''
......
......@@ -33,7 +33,7 @@
from gajim.gtk import SingleMessageWindow
class ChatControlSession(object):
class ChatControlSession:
def __init__(self, conn, jid, thread_id, type_='chat'):
self.conn = conn
self.jid = jid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment