From 9bc57a01e1c0942e1a94ac0d948c8c5f8c0d4dcc Mon Sep 17 00:00:00 2001 From: Jan Barta <55042barta@sstebrno.eu> Date: Fri, 3 Jun 2016 12:45:01 +0200 Subject: [PATCH] pylint: fix old-style-class Reviewed-By: Tomas Krizek Reviewed-By: Florence Blanc-Renaud --- ipaclient/ipachangeconf.py | 2 +- ipalib/aci.py | 3 ++- ipapython/config.py | 3 ++- ipapython/graph.py | 2 +- ipapython/sysrestore.py | 6 ++++-- ipaserver/install/installutils.py | 2 +- ipaserver/install/ldapupdate.py | 2 +- pylintrc | 1 - 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ipaclient/ipachangeconf.py b/ipaclient/ipachangeconf.py index 1b5167c55..64177f8fa 100644 --- a/ipaclient/ipachangeconf.py +++ b/ipaclient/ipachangeconf.py @@ -48,7 +48,7 @@ def openLocked(filename, perms): #TODO: put section delimiters as separating element of the list # so that we can process multiple sections in one go #TODO: add a comment all but provided options as a section option -class IPAChangeConf: +class IPAChangeConf(object): def __init__(self, name): self.progname = name diff --git a/ipalib/aci.py b/ipalib/aci.py index 97ed0c371..da082aec7 100755 --- a/ipalib/aci.py +++ b/ipalib/aci.py @@ -39,7 +39,8 @@ ACTIONS = ["allow", "deny"] PERMISSIONS = ["read", "write", "add", "delete", "search", "compare", "selfwrite", "proxy", "all"] -class ACI: + +class ACI(object): """ 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 diff --git a/ipapython/config.py b/ipapython/config.py index 70afaffa2..38e1087f6 100644 --- a/ipapython/config.py +++ b/ipapython/config.py @@ -126,7 +126,8 @@ def verify_args(parser, args, needed_args = None): elif len_have < len_need: parser.error("no %s specified" % needed_list[len_have]) -class IPAConfig: + +class IPAConfig(object): def __init__(self): self.default_realm = None self.default_server = [] diff --git a/ipapython/graph.py b/ipapython/graph.py index b4373abea..0e06a0831 100644 --- a/ipapython/graph.py +++ b/ipapython/graph.py @@ -3,7 +3,7 @@ # -class Graph(): +class Graph(object): """ Simple oriented graph structure diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py index cd09caee5..1cc7ce56a 100644 --- a/ipapython/sysrestore.py +++ b/ipapython/sysrestore.py @@ -42,7 +42,8 @@ SYSRESTORE_PATH = paths.TMP SYSRESTORE_INDEXFILE = "sysrestore.index" SYSRESTORE_STATEFILE = "sysrestore.state" -class FileStore: + +class FileStore(object): """Class for handling backup and restore of files""" def __init__(self, path = SYSRESTORE_PATH, index_file = SYSRESTORE_INDEXFILE): @@ -290,7 +291,8 @@ class FileStore: return True -class StateFile: + +class StateFile(object): """A metadata file for recording system state which can be backed up and later restored. StateFile gets reloaded every time to prevent loss of information diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 7578bf8f5..bf179a28a 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -102,7 +102,7 @@ class UpgradeMissingVersionError(UpgradeVersionError): pass -class ReplicaConfig: +class ReplicaConfig(object): def __init__(self, top_dir=None): self.realm_name = "" self.domain_name = "" diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 7d87c8b22..58251ca48 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -134,7 +134,7 @@ def safe_output(attr, values): return values -class LDAPUpdate: +class LDAPUpdate(object): action_keywords = ["default", "add", "remove", "only", "onlyifexist", "deleteentry", "replace", "addifnew", "addifexist"] def __init__(self, dm_password=None, sub_dict={}, diff --git a/pylintrc b/pylintrc index 0b04b0191..102d2d85e 100644 --- a/pylintrc +++ b/pylintrc @@ -69,7 +69,6 @@ disable= line-too-long, missing-docstring, multiple-statements, - old-style-class, superfluous-parens, too-many-lines, unidiomatic-typecheck,