From b314ec9782a9de04b87115404835015343c864fb Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 17 Jul 2024 18:01:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5(backend)=20remove=20todo=20items?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Pylint job was failing due to those TODO items. In our make lint command sequence, Pylint runs first. If it fails, Ruff won't run, which is quite inconvenient. I've extracted those TODOs into an issue for further review. --- src/backend/core/api/serializers.py | 2 -- src/backend/core/api/viewsets.py | 1 - src/backend/core/utils.py | 1 - 3 files changed, 4 deletions(-) diff --git a/src/backend/core/api/serializers.py b/src/backend/core/api/serializers.py index 5894fa88..7b3f9c6f 100644 --- a/src/backend/core/api/serializers.py +++ b/src/backend/core/api/serializers.py @@ -134,6 +134,4 @@ def to_representation(self, instance): output["is_administrable"] = is_admin - # todo - pass properly livekit configuration - return output diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index fe1255f5..f6bcd394 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -209,7 +209,6 @@ def list(self, request, *args, **kwargs): user = self.request.user if user.is_authenticated: - # todo - simplify this queryset queryset = ( self.filter_queryset(self.get_queryset()) .filter(Q(users=user)) diff --git a/src/backend/core/utils.py b/src/backend/core/utils.py index 7055eae6..65118b52 100644 --- a/src/backend/core/utils.py +++ b/src/backend/core/utils.py @@ -22,7 +22,6 @@ def generate_token(room: str, user, username: Optional[str] = None) -> str: str: The LiveKit JWT access token. """ - # todo - define the video grants properly based on user and room. video_grants = VideoGrants( room=room, room_join=True,