From 33ecd1601a6f2fcab1c2c4ed65d524bf48abf2b3 Mon Sep 17 00:00:00 2001 From: lilly Date: Tue, 15 Oct 2024 17:53:08 +0200 Subject: [PATCH] fix errors introduced in new mypy version --- .../integrations/djangorestframework/permissions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simple_openid_connect/integrations/djangorestframework/permissions.py b/src/simple_openid_connect/integrations/djangorestframework/permissions.py index 6e9de52..7c326a9 100644 --- a/src/simple_openid_connect/integrations/djangorestframework/permissions.py +++ b/src/simple_openid_connect/integrations/djangorestframework/permissions.py @@ -21,7 +21,7 @@ logger = logging.getLogger(__name__) -class _HasScope(BasePermission): # type: ignore # ignores a metaclass conflict that doesn't really exist +class _HasScope(BasePermission): @staticmethod def _get_required_scopes(view: Any) -> str: if hasattr(view, "required_scopes"): @@ -43,7 +43,7 @@ def _validate_scopes(required_scopes: str, granted_scopes: str) -> bool: ) -class HasSessionScope(_HasScope): # type: ignore +class HasSessionScope(_HasScope): """Check whether an authenticated user has a session with the required scope""" def has_permission(self, request: HttpRequest, view: Any) -> bool: @@ -66,7 +66,7 @@ def has_permission(self, request: HttpRequest, view: Any) -> bool: return False -class HasTokenScope(_HasScope): # type: ignore +class HasTokenScope(_HasScope): """Check whether an authenticated user has a token with the required scope""" def has_permission(self, request: HttpRequest, view: Any) -> bool: