Skip to content

Commit

Permalink
fix errors introduced in new mypy version
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Oct 15, 2024
1 parent 29b56c3 commit 33ecd16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 33ecd16

Please sign in to comment.