diff --git a/docs/developer/extending.rst b/docs/developer/extending.rst index 5927e07c..95f0cb54 100644 --- a/docs/developer/extending.rst +++ b/docs/developer/extending.rst @@ -206,7 +206,9 @@ Once you have created the models, add the following to your OPENWISP_RADIUS_RADIUSGROUP_MODEL = "myradius.RadiusGroup" OPENWISP_RADIUS_RADIUSTOKEN_MODEL = "myradius.RadiusToken" OPENWISP_RADIUS_PHONETOKEN_MODEL = "myradius.PhoneToken" - OPENWISP_RADIUS_ORGANIZATIONRADIUSSETTINGS_MODEL = "myradius.OrganizationRadiusSettings" + OPENWISP_RADIUS_ORGANIZATIONRADIUSSETTINGS_MODEL = ( + "myradius.OrganizationRadiusSettings" + ) OPENWISP_RADIUS_REGISTEREDUSER_MODEL = "myradius.RegisteredUser" # You will need to change AUTH_USER_MODEL if you are extending openwisp_users @@ -313,7 +315,9 @@ resort to monkey patching, you can proceed as follows: RadiusGroupCheck = load_model("openwisp_radius", "RadiusGroupCheck") RadiusGroupReply = load_model("openwisp_radius", "RadiusGroupReply") RadiusUserGroup = load_model("openwisp_radius", "RadiusUserGroup") - OrganizationRadiusSettings = load_model("openwisp_radius", "OrganizationRadiusSettings") + OrganizationRadiusSettings = load_model( + "openwisp_radius", "OrganizationRadiusSettings" + ) User = get_user_model() admin.site.unregister(RadiusCheck) diff --git a/docs/user/settings.rst b/docs/user/settings.rst index c29f4242..1c8dd4d7 100644 --- a/docs/user/settings.rst +++ b/docs/user/settings.rst @@ -539,7 +539,9 @@ means that the global setting specified in ``settings.py`` will be used. .. code-block:: python - {"__all__": "https://{site}/{organization}/password/reset/confirm/{uid}/{token}"} + { + "__all__": "https://{site}/{organization}/password/reset/confirm/{uid}/{token}" + } A dictionary representing the frontend URLs through which end users can complete the password reset operation. @@ -869,7 +871,9 @@ type in the API response for ``ChilliSpot-Max-Input-Octets`` attribute: .. code-block:: python - OPENWISP_RADIUS_RADIUS_ATTRIBUTES_TYPE_MAP = {"ChilliSpot-Max-Input-Octets": "bytes"} + OPENWISP_RADIUS_RADIUS_ATTRIBUTES_TYPE_MAP = { + "ChilliSpot-Max-Input-Octets": "bytes" + } .. _radius_social_login_settings: diff --git a/openwisp_radius/api/views.py b/openwisp_radius/api/views.py index 30190cad..6bb21916 100644 --- a/openwisp_radius/api/views.py +++ b/openwisp_radius/api/views.py @@ -155,9 +155,9 @@ def get(self, request, *args, **kwargs): if radbatch.strategy == 'prefix': pdf = generate_pdf(radbatch.pk) response = HttpResponse(content_type='application/pdf') - response['Content-Disposition'] = ( - f'attachment; filename="{radbatch.name}.pdf"' - ) + response[ + 'Content-Disposition' + ] = f'attachment; filename="{radbatch.name}.pdf"' response.write(pdf) return response else: diff --git a/openwisp_radius/tests/test_saml/utils.py b/openwisp_radius/tests/test_saml/utils.py index 27a57099..3c173780 100644 --- a/openwisp_radius/tests/test_saml/utils.py +++ b/openwisp_radius/tests/test_saml/utils.py @@ -25,6 +25,6 @@ def add_outstanding_query(self, session_id, came_from): came_from, ) self.saml_session.save() - self.client.cookies[settings.SESSION_COOKIE_NAME] = ( - self.saml_session.session_key - ) + self.client.cookies[ + settings.SESSION_COOKIE_NAME + ] = self.saml_session.session_key