Skip to content

Commit

Permalink
[changes] refactored using `black==23.12.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilsharmaa committed Dec 4, 2024
1 parent 6fa896f commit e341735
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 6 additions & 2 deletions docs/developer/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions docs/user/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down
6 changes: 3 additions & 3 deletions openwisp_radius/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions openwisp_radius/tests/test_saml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e341735

Please sign in to comment.