Do not make object inheritance

This patch removes these lintian warnings:

Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
This commit is contained in:
Rodolfo García Peñas (kix)
2020-08-29 21:44:18 +02:00
parent ddfc2a766c
commit e77440552c
16 changed files with 27 additions and 27 deletions

View File

@ -157,7 +157,7 @@ def CustomConfigDefault():
pass
class ConfigHelperMixin(object):
class ConfigHelperMixin():
"""Allow comfortable retrieving of config values pertaining
to a section.

View File

@ -26,7 +26,7 @@ from offlineimap.error import OfflineImapError
import offlineimap.accounts
class BaseFolder(object):
class BaseFolder():
__hash__ = None
def __init__(self, name, repository):

View File

@ -25,7 +25,7 @@ import six
from .Base import BaseFolder
class DatabaseFileLock(object):
class DatabaseFileLock():
"""Lock at database file level."""
def __init__(self):

View File

@ -32,7 +32,7 @@ from offlineimap.ui import getglobalui
from offlineimap.virtual_imaplib2 import IMAP4, IMAP4_SSL, InternalDate
class UsefulIMAPMixIn(object):
class UsefulIMAPMixIn():
def __getselectedfolder(self):
if self.state == 'SELECTED':
return self.mailbox

View File

@ -42,7 +42,7 @@ except ImportError:
have_gss = False
class IMAPServer(object):
class IMAPServer():
"""Initializes all variables from an IMAPRepository() instance
Various functions, such as acquireconnection() return an IMAP4
@ -770,7 +770,7 @@ class IMAPServer(object):
self.semaphore.release()
class IdleThread(object):
class IdleThread():
def __init__(self, parent, folder=None):
"""If invoked without 'folder', perform a NOOP and wait for
self.stop() to be called. If invoked with folder, switch to IDLE

View File

@ -62,7 +62,7 @@ def syncitall(list_accounts, config):
threads.wait() # Blocks until all accounts are processed.
class OfflineImap(object):
class OfflineImap():
"""The main class that encapsulates the high level use of OfflineImap.
To invoke OfflineImap you would call it with::

View File

@ -19,7 +19,7 @@
import imp
class LocalEval(object):
class LocalEval():
"""Here is a powerfull but very dangerous option, of course."""
def __init__(self, path=None):

View File

@ -78,7 +78,7 @@ def writeIntermediateFile(accountname):
_mbnames.write()
class _IntermediateMbnames(object):
class _IntermediateMbnames():
"""mbnames data for one account."""
def __init__(self, accountname, folder_root, mbnamesdir, folderfilter,
@ -120,7 +120,7 @@ class _IntermediateMbnames(object):
json.dump(itemlist, intermediateFD)
class _Mbnames(object):
class _Mbnames():
def __init__(self, config, ui, dry_run):
self._config = config

View File

@ -510,7 +510,7 @@ class IMAPRepository(BaseRepository):
"""Converts a cmp= function into a key= function
We need to keep cmp functions for backward compatibility"""
class K(object):
class K():
def __init__(self, obj, *args):
self.obj = obj

View File

@ -30,7 +30,7 @@ from offlineimap.repository.LocalStatus import LocalStatusRepository
from offlineimap.error import OfflineImapError
class Repository(object):
class Repository():
"""Abstract class that returns the correct Repository type
instance based on 'account' and 'reqtype', e.g. a
class:`ImapRepository` instance."""

View File

@ -37,7 +37,7 @@ def semaphorereset(semaphore, originalstate):
semaphore.release()
class accountThreads(object):
class accountThreads():
"""Store the list of all threads in the software so it can be used to find out
what's running and what's not."""

View File

@ -50,7 +50,7 @@ def getglobalui():
return globalui
class UIBase(object):
class UIBase():
def __init__(self, config, loglevel=logging.INFO):
self.config = config
# Is this a 'dryrun'?

View File

@ -6,7 +6,7 @@
import copy
class ConstProxy(object):
class ConstProxy():
"""Implements read-only access to a given object
that can be attached to each instance only once."""