From 9d392931df864f3f1153ce1f1f33f4babd83de23 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 3 Aug 2021 18:04:56 +0200 Subject: [PATCH] root: fix lint errors from re-format Signed-off-by: Jens Langhammer --- authentik/crypto/models.py | 4 ++-- authentik/providers/oauth2/errors.py | 2 +- authentik/sources/oauth/types/twitter.py | 4 +--- web/src/pages/LibraryPage.ts | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/authentik/crypto/models.py b/authentik/crypto/models.py index 7e3610b07..5a318b7dc 100644 --- a/authentik/crypto/models.py +++ b/authentik/crypto/models.py @@ -79,8 +79,8 @@ class CertificateKeyPair(CreatedUpdatedModel): def kid(self): """Get Key ID used for JWKS""" return "{0}".format( - md5(self.key_data.encode("utf-8")).hexdigest() if self.key_data else "" - ) # nosec + md5(self.key_data.encode("utf-8")).hexdigest() if self.key_data else "" # nosec + ) def __str__(self) -> str: return f"Certificate-Key Pair {self.name}" diff --git a/authentik/providers/oauth2/errors.py b/authentik/providers/oauth2/errors.py index 3e24ff1d4..6dcdc304a 100644 --- a/authentik/providers/oauth2/errors.py +++ b/authentik/providers/oauth2/errors.py @@ -204,7 +204,7 @@ class BearerTokenError(OAuth2Error): 401, ), "insufficient_scope": ( - "The request requires higher privileges than provided by " "the access token", + "The request requires higher privileges than provided by the access token", 403, ), } diff --git a/authentik/sources/oauth/types/twitter.py b/authentik/sources/oauth/types/twitter.py index 91bd1d70d..3cb2e5461 100644 --- a/authentik/sources/oauth/types/twitter.py +++ b/authentik/sources/oauth/types/twitter.py @@ -30,6 +30,4 @@ class TwitterType(SourceType): request_token_url = "https://api.twitter.com/oauth/request_token" # nosec authorization_url = "https://api.twitter.com/oauth/authenticate" access_token_url = "https://api.twitter.com/oauth/access_token" # nosec - profile_url = ( - "https://api.twitter.com/1.1/account/" "verify_credentials.json?include_email=true" - ) + profile_url = "https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true" diff --git a/web/src/pages/LibraryPage.ts b/web/src/pages/LibraryPage.ts index cf4e5eec9..037c5eaa5 100644 --- a/web/src/pages/LibraryPage.ts +++ b/web/src/pages/LibraryPage.ts @@ -14,7 +14,7 @@ import { Application, CoreApi } from "authentik-api"; import { AKResponse } from "../api/Client"; import { DEFAULT_CONFIG } from "../api/Config"; import { me } from "../api/Users"; -import { loading, truncate } from "../utils"; +import { loading } from "../utils"; import "../elements/PageHeader"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css";