pylint: fix old-style-class

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Jan Barta 2016-06-03 12:45:01 +02:00 committed by Martin Basti
parent 568f9da331
commit 9bc57a01e1
8 changed files with 12 additions and 9 deletions

View File

@ -48,7 +48,7 @@ def openLocked(filename, perms):
#TODO: put section delimiters as separating element of the list #TODO: put section delimiters as separating element of the list
# so that we can process multiple sections in one go # so that we can process multiple sections in one go
#TODO: add a comment all but provided options as a section option #TODO: add a comment all but provided options as a section option
class IPAChangeConf: class IPAChangeConf(object):
def __init__(self, name): def __init__(self, name):
self.progname = name self.progname = name

View File

@ -39,7 +39,8 @@ ACTIONS = ["allow", "deny"]
PERMISSIONS = ["read", "write", "add", "delete", "search", "compare", PERMISSIONS = ["read", "write", "add", "delete", "search", "compare",
"selfwrite", "proxy", "all"] "selfwrite", "proxy", "all"]
class ACI:
class ACI(object):
""" """
Holds the basic data for an ACI entry, as stored in the cn=accounts Holds the basic data for an ACI entry, as stored in the cn=accounts
entry in LDAP. Has methods to parse an ACI string and export to an entry in LDAP. Has methods to parse an ACI string and export to an

View File

@ -126,7 +126,8 @@ def verify_args(parser, args, needed_args = None):
elif len_have < len_need: elif len_have < len_need:
parser.error("no %s specified" % needed_list[len_have]) parser.error("no %s specified" % needed_list[len_have])
class IPAConfig:
class IPAConfig(object):
def __init__(self): def __init__(self):
self.default_realm = None self.default_realm = None
self.default_server = [] self.default_server = []

View File

@ -3,7 +3,7 @@
# #
class Graph(): class Graph(object):
""" """
Simple oriented graph structure Simple oriented graph structure

View File

@ -42,7 +42,8 @@ SYSRESTORE_PATH = paths.TMP
SYSRESTORE_INDEXFILE = "sysrestore.index" SYSRESTORE_INDEXFILE = "sysrestore.index"
SYSRESTORE_STATEFILE = "sysrestore.state" SYSRESTORE_STATEFILE = "sysrestore.state"
class FileStore:
class FileStore(object):
"""Class for handling backup and restore of files""" """Class for handling backup and restore of files"""
def __init__(self, path = SYSRESTORE_PATH, index_file = SYSRESTORE_INDEXFILE): def __init__(self, path = SYSRESTORE_PATH, index_file = SYSRESTORE_INDEXFILE):
@ -290,7 +291,8 @@ class FileStore:
return True return True
class StateFile:
class StateFile(object):
"""A metadata file for recording system state which can """A metadata file for recording system state which can
be backed up and later restored. be backed up and later restored.
StateFile gets reloaded every time to prevent loss of information StateFile gets reloaded every time to prevent loss of information

View File

@ -102,7 +102,7 @@ class UpgradeMissingVersionError(UpgradeVersionError):
pass pass
class ReplicaConfig: class ReplicaConfig(object):
def __init__(self, top_dir=None): def __init__(self, top_dir=None):
self.realm_name = "" self.realm_name = ""
self.domain_name = "" self.domain_name = ""

View File

@ -134,7 +134,7 @@ def safe_output(attr, values):
return values return values
class LDAPUpdate: class LDAPUpdate(object):
action_keywords = ["default", "add", "remove", "only", "onlyifexist", "deleteentry", "replace", "addifnew", "addifexist"] action_keywords = ["default", "add", "remove", "only", "onlyifexist", "deleteentry", "replace", "addifnew", "addifexist"]
def __init__(self, dm_password=None, sub_dict={}, def __init__(self, dm_password=None, sub_dict={},

View File

@ -69,7 +69,6 @@ disable=
line-too-long, line-too-long,
missing-docstring, missing-docstring,
multiple-statements, multiple-statements,
old-style-class,
superfluous-parens, superfluous-parens,
too-many-lines, too-many-lines,
unidiomatic-typecheck, unidiomatic-typecheck,