mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] stop using old style class
This commit is contained in:
parent
8127e7cd1a
commit
9855b6d7f5
8 changed files with 14 additions and 14 deletions
|
@ -34,7 +34,7 @@ ldapsearch -x -b 'dc=nodomain' | \\
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class Element(object):
|
class Element:
|
||||||
"""Represents an LDIF entry."""
|
"""Represents an LDIF entry."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -109,7 +109,7 @@ class Element(object):
|
||||||
|
|
||||||
return TABLE_TEMPLATE % (self.index, '\n '.join(_format(self.attributes)), self.edge(dnmap))
|
return TABLE_TEMPLATE % (self.index, '\n '.join(_format(self.attributes)), self.edge(dnmap))
|
||||||
|
|
||||||
class Converter(object):
|
class Converter:
|
||||||
"""An LDIF to DOT converter."""
|
"""An LDIF to DOT converter."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -31,7 +31,7 @@ __all__ = ["init", "api", "cli", "m18n", "MoulinetteError", "Moulinette"]
|
||||||
m18n = Moulinette18n()
|
m18n = Moulinette18n()
|
||||||
|
|
||||||
|
|
||||||
class classproperty(object):
|
class classproperty:
|
||||||
def __init__(self, f):
|
def __init__(self, f):
|
||||||
self.f = f
|
self.f = f
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ logger = logging.getLogger("moulinette.actionsmap")
|
||||||
# Extra parameters definition
|
# Extra parameters definition
|
||||||
|
|
||||||
|
|
||||||
class _ExtraParameter(object):
|
class _ExtraParameter:
|
||||||
"""
|
"""
|
||||||
Argument parser for an extra parameter.
|
Argument parser for an extra parameter.
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ extraparameters_list = [
|
||||||
# Extra parameters argument Parser
|
# Extra parameters argument Parser
|
||||||
|
|
||||||
|
|
||||||
class ExtraArgumentParser(object):
|
class ExtraArgumentParser:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Argument validator and parser for the extra parameters.
|
Argument validator and parser for the extra parameters.
|
||||||
|
@ -373,7 +373,7 @@ class ExtraArgumentParser(object):
|
||||||
# Main class ----------------------------------------------------------
|
# Main class ----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class ActionsMap(object):
|
class ActionsMap:
|
||||||
|
|
||||||
"""Validate and process actions defined into an actions map
|
"""Validate and process actions defined into an actions map
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ logger = logging.getLogger("moulinette.authenticator")
|
||||||
# Base Class -----------------------------------------------------------
|
# Base Class -----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class BaseAuthenticator(object):
|
class BaseAuthenticator:
|
||||||
|
|
||||||
"""Authenticator base representation
|
"""Authenticator base representation
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ def during_unittests_run():
|
||||||
# Internationalization -------------------------------------------------
|
# Internationalization -------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class Translator(object):
|
class Translator:
|
||||||
|
|
||||||
"""Internationalization class
|
"""Internationalization class
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ class Translator(object):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Moulinette18n(object):
|
class Moulinette18n:
|
||||||
|
|
||||||
"""Internationalization service for the moulinette
|
"""Internationalization service for the moulinette
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ class MoulinetteAuthenticationError(MoulinetteError):
|
||||||
http_code = 401
|
http_code = 401
|
||||||
|
|
||||||
|
|
||||||
class MoulinetteLock(object):
|
class MoulinetteLock:
|
||||||
|
|
||||||
"""Locker for a moulinette instance
|
"""Locker for a moulinette instance
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ CALLBACKS_PROP = "_callbacks"
|
||||||
# Base Class -----------------------------------------------------------
|
# Base Class -----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class BaseActionsMapParser(object):
|
class BaseActionsMapParser:
|
||||||
|
|
||||||
"""Actions map's base Parser
|
"""Actions map's base Parser
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ class APIQueueHandler(logging.Handler):
|
||||||
sleep(0)
|
sleep(0)
|
||||||
|
|
||||||
|
|
||||||
class _HTTPArgumentParser(object):
|
class _HTTPArgumentParser:
|
||||||
|
|
||||||
"""Argument parser for HTTP requests
|
"""Argument parser for HTTP requests
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ class Session:
|
||||||
response.delete_cookie(f"session.{Session.actionsmap_name}")
|
response.delete_cookie(f"session.{Session.actionsmap_name}")
|
||||||
|
|
||||||
|
|
||||||
class _ActionsMapPlugin(object):
|
class _ActionsMapPlugin:
|
||||||
|
|
||||||
"""Actions map Bottle Plugin
|
"""Actions map Bottle Plugin
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ def getActionLogger(name=None, logger=None, action_id=None):
|
||||||
return logger
|
return logger
|
||||||
|
|
||||||
|
|
||||||
class ActionFilter(object):
|
class ActionFilter:
|
||||||
|
|
||||||
"""Extend log record for an optionnal action
|
"""Extend log record for an optionnal action
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue