diff --git a/doc/ldif2dot-0.1.py b/doc/ldif2dot-0.1.py index e016d22b..11165474 100644 --- a/doc/ldif2dot-0.1.py +++ b/doc/ldif2dot-0.1.py @@ -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): diff --git a/moulinette/__init__.py b/moulinette/__init__.py index 7c39a673..5cdf7410 100755 --- a/moulinette/__init__.py +++ b/moulinette/__init__.py @@ -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 diff --git a/moulinette/actionsmap.py b/moulinette/actionsmap.py index b0b4b2bc..62ae5ca1 100644 --- a/moulinette/actionsmap.py +++ b/moulinette/actionsmap.py @@ -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 diff --git a/moulinette/authentication.py b/moulinette/authentication.py index afe2c47d..4db1acc5 100644 --- a/moulinette/authentication.py +++ b/moulinette/authentication.py @@ -10,7 +10,7 @@ logger = logging.getLogger("moulinette.authenticator") # Base Class ----------------------------------------------------------- -class BaseAuthenticator(object): +class BaseAuthenticator: """Authenticator base representation diff --git a/moulinette/core.py b/moulinette/core.py index 9dfcd7f8..af043083 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -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 diff --git a/moulinette/interfaces/__init__.py b/moulinette/interfaces/__init__.py index 9a5a353a..eeb0a97a 100644 --- a/moulinette/interfaces/__init__.py +++ b/moulinette/interfaces/__init__.py @@ -22,7 +22,7 @@ CALLBACKS_PROP = "_callbacks" # Base Class ----------------------------------------------------------- -class BaseActionsMapParser(object): +class BaseActionsMapParser: """Actions map's base Parser diff --git a/moulinette/interfaces/api.py b/moulinette/interfaces/api.py index 4bfc51fe..7ce813ee 100644 --- a/moulinette/interfaces/api.py +++ b/moulinette/interfaces/api.py @@ -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 diff --git a/moulinette/utils/log.py b/moulinette/utils/log.py index 375affc2..283c121e 100644 --- a/moulinette/utils/log.py +++ b/moulinette/utils/log.py @@ -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