Run Black over the whole codebase

This commit is contained in:
Danielle McLean 2023-08-10 16:52:37 +10:00
parent cd990e4e2f
commit 2e7d12b3e6
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
109 changed files with 1539 additions and 1209 deletions

View file

@ -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