From 8b8b6ec2838bf2004b35b6f4154e8de497513eca Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Fri, 1 Jan 2021 16:27:57 +0100 Subject: [PATCH] [PreferenceLayout] Improve docstrings and fix empty lines --- aleksis/core/util/forms.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/aleksis/core/util/forms.py b/aleksis/core/util/forms.py index edacfa9ab..9d7279892 100644 --- a/aleksis/core/util/forms.py +++ b/aleksis/core/util/forms.py @@ -4,20 +4,19 @@ from material import Layout, Row class PreferenceLayout(Layout): - """ - Create a django-material Layout object for the given form_base_class. - - :param form_base_class: A Form class used as the base. Must have a ``registry` attribute - :param section: A section where the layout builder will load preferences - """ + """django-material Layout object for managing preferences.""" def __init__(self, form_base_class, section=None): + """ + Create Layout object for the given form_base_class. + :param form_base_class: A Form class used as the base. Must have a ``registry` attribute + :param section: A section where the layout builder will load preferences + """ registry = form_base_class.registry if section: # Try to use section param preferences_obj = registry.preferences(section=section) - else: # display all preferences in the form preferences_obj = registry.preferences() -- GitLab