diff --git a/plinth/action_utils.py b/plinth/action_utils.py index 86042f85a..ffaad50d1 100644 --- a/plinth/action_utils.py +++ b/plinth/action_utils.py @@ -207,7 +207,7 @@ def webserver_disable(name, kind='config', apply_changes=True): return action_required -class WebserverChange(object): +class WebserverChange: """Context to restart/reload Apache after configuration changes.""" def __init__(self): diff --git a/plinth/modules/config/tests/test_config.py b/plinth/modules/config/tests/test_config.py index 68115528e..378626a4b 100644 --- a/plinth/modules/config/tests/test_config.py +++ b/plinth/modules/config/tests/test_config.py @@ -120,7 +120,7 @@ def test_homepage_mapping_skip_ci(): assert _home_page_scid2url(uws_scid) is None -class Dict2Obj(object): +class Dict2Obj: """Mock object made out of any dict.""" def __init__(self, a_dict): diff --git a/plinth/modules/users/views.py b/plinth/modules/users/views.py index 3df2f31a7..ede8e0add 100644 --- a/plinth/modules/users/views.py +++ b/plinth/modules/users/views.py @@ -24,7 +24,7 @@ from .forms import (CreateUserForm, FirstBootForm, UserChangePasswordForm, UserUpdateForm) -class ContextMixin(object): +class ContextMixin: """Mixin to add 'title' to the template context.""" def get_context_data(self, **kwargs): diff --git a/plinth/package.py b/plinth/package.py index bb916e017..9ae39d9a2 100644 --- a/plinth/package.py +++ b/plinth/package.py @@ -252,7 +252,7 @@ class PackageException(Exception): .format(self.error_string, self.error_details) -class Transaction(object): +class Transaction: """Information about an ongoing transaction.""" def __init__(self, module_name, package_names): diff --git a/plinth/setup.py b/plinth/setup.py index ae45399e5..1f43fece9 100644 --- a/plinth/setup.py +++ b/plinth/setup.py @@ -28,7 +28,7 @@ _is_shutting_down = False _force_upgrader = None -class Helper(object): +class Helper: """Helper routines for modules to show progress.""" def __init__(self, module_name, module): diff --git a/plinth/utils.py b/plinth/utils.py index f6cb6c749..34b1db425 100644 --- a/plinth/utils.py +++ b/plinth/utils.py @@ -89,7 +89,7 @@ def is_user_admin(request, cached=False): return user_is_admin -class YAMLFile(object): +class YAMLFile: """A context management class for updating YAML files""" def __init__(self, yaml_file):