Run Black over the whole codebase
This commit is contained in:
parent
cd990e4e2f
commit
2e7d12b3e6
109 changed files with 1539 additions and 1209 deletions
|
@ -20,15 +20,15 @@ class Client:
|
|||
self.id = client_id
|
||||
self.count = 0
|
||||
self.scopes = set()
|
||||
apps = mf2(self.id).to_dict(filter_by_type='h-x-app')
|
||||
apps = mf2(self.id).to_dict(filter_by_type="h-x-app")
|
||||
try:
|
||||
self.app = apps[0]['properties']
|
||||
self.app = apps[0]["properties"]
|
||||
except IndexError:
|
||||
self.app = None
|
||||
|
||||
|
||||
class TokensListView(LoginRequiredMixin, TemplateView):
|
||||
template_name = 'lemonauth/tokens.html'
|
||||
template_name = "lemonauth/tokens.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
@ -36,6 +36,6 @@ class TokensListView(LoginRequiredMixin, TemplateView):
|
|||
for token in self.request.user.token_set.all():
|
||||
client = clients[token.client_id]
|
||||
client.count += 1
|
||||
client.scopes |= set(token.scope.split(' '))
|
||||
context.update({'clients': clients, 'title': 'tokens'})
|
||||
client.scopes |= set(token.scope.split(" "))
|
||||
context.update({"clients": clients, "title": "tokens"})
|
||||
return context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue