Skip to content

Commit c235484

Browse files
committed
Format code style to fit the precommit standard
1 parent 41ef2ad commit c235484

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

bluesky_httpserver/authorization/resource_access.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ def get_resource_group(self, username, group):
8181
class SingleGroupResourceAccessControl(DefaultResourceAccessControl):
8282
"""
8383
Single group resource access policy.
84-
The resource access policy associates users with its correspondent first user group. The groups
85-
define the resources, such as plans and devices users can access. The
86-
single group policy assumes that one user belong to a single group or if they are unauthenticated or
87-
have authenticated with a single-user API key, it uses the default user group.
88-
The arguments of the class constructor are the same as the one specified in the DefaultResourceAccessControl configuration
89-
file as shown in the example below.
84+
The resource access policy associates users with its correspondent first user group.
85+
The groups define the resources, such as plans and devices users can access. The
86+
single group policy assumes that one user belong to a single group or if they are
87+
unauthenticated or have authenticated with a single-user API key, it uses the default
88+
user group.
89+
The arguments of the class constructor are the same as the one specified in the
90+
DefaultResourceAccessControl configuration ile as shown in the example below.
9091
9192
Parameters
9293
----------
@@ -95,7 +96,8 @@ class SingleGroupResourceAccessControl(DefaultResourceAccessControl):
9596
9697
Examples
9798
--------
98-
Configure ``SingleGroupResourceAccessControl`` policy. The default group name is ``test_user``.
99+
Configure ``SingleGroupResourceAccessControl`` policy. The default group name is
100+
``test_user``.
99101
100102
.. code-block::
101103
@@ -120,10 +122,7 @@ def get_resource_group(self, username, group):
120122
Name of the user group.
121123
"""
122124
if isinstance(group, list):
123-
if group[0] in ['unauthenticated_public', 'unauthenticated_single_user']:
125+
if group[0] in ["unauthenticated_public", "unauthenticated_single_user"]:
124126
return self.get_resource_group(username, group)
125127
return group[0]
126128
return group
127-
128-
129-

0 commit comments

Comments
 (0)