[mod] stop using old style class

This commit is contained in:
Laurent Peuch 2021-12-24 01:18:11 +01:00
parent 8127e7cd1a
commit 9855b6d7f5
8 changed files with 14 additions and 14 deletions

View file

@ -34,7 +34,7 @@ ldapsearch -x -b 'dc=nodomain' | \\
import sys
class Element(object):
class Element:
"""Represents an LDIF entry."""
def __init__(self):
@ -109,7 +109,7 @@ class Element(object):
return TABLE_TEMPLATE % (self.index, '\n '.join(_format(self.attributes)), self.edge(dnmap))
class Converter(object):
class Converter:
"""An LDIF to DOT converter."""
def __init__(self):

View file

@ -31,7 +31,7 @@ __all__ = ["init", "api", "cli", "m18n", "MoulinetteError", "Moulinette"]
m18n = Moulinette18n()
class classproperty(object):
class classproperty:
def __init__(self, f):
self.f = f

View file

@ -30,7 +30,7 @@ logger = logging.getLogger("moulinette.actionsmap")
# Extra parameters definition
class _ExtraParameter(object):
class _ExtraParameter:
"""
Argument parser for an extra parameter.
@ -261,7 +261,7 @@ extraparameters_list = [
# Extra parameters argument Parser
class ExtraArgumentParser(object):
class ExtraArgumentParser:
"""
Argument validator and parser for the extra parameters.
@ -373,7 +373,7 @@ class ExtraArgumentParser(object):
# Main class ----------------------------------------------------------
class ActionsMap(object):
class ActionsMap:
"""Validate and process actions defined into an actions map

View file

@ -10,7 +10,7 @@ logger = logging.getLogger("moulinette.authenticator")
# Base Class -----------------------------------------------------------
class BaseAuthenticator(object):
class BaseAuthenticator:
"""Authenticator base representation

View file

@ -30,7 +30,7 @@ def during_unittests_run():
# Internationalization -------------------------------------------------
class Translator(object):
class Translator:
"""Internationalization class
@ -190,7 +190,7 @@ class Translator(object):
return True
class Moulinette18n(object):
class Moulinette18n:
"""Internationalization service for the moulinette
@ -312,7 +312,7 @@ class MoulinetteAuthenticationError(MoulinetteError):
http_code = 401
class MoulinetteLock(object):
class MoulinetteLock:
"""Locker for a moulinette instance

View file

@ -22,7 +22,7 @@ CALLBACKS_PROP = "_callbacks"
# Base Class -----------------------------------------------------------
class BaseActionsMapParser(object):
class BaseActionsMapParser:
"""Actions map's base Parser

View file

@ -101,7 +101,7 @@ class APIQueueHandler(logging.Handler):
sleep(0)
class _HTTPArgumentParser(object):
class _HTTPArgumentParser:
"""Argument parser for HTTP requests
@ -275,7 +275,7 @@ class Session:
response.delete_cookie(f"session.{Session.actionsmap_name}")
class _ActionsMapPlugin(object):
class _ActionsMapPlugin:
"""Actions map Bottle Plugin

View file

@ -167,7 +167,7 @@ def getActionLogger(name=None, logger=None, action_id=None):
return logger
class ActionFilter(object):
class ActionFilter:
"""Extend log record for an optionnal action