uselotus / lotus

File .deepsource.toml not found in the default branch of the repository root. Please refer to the docs.

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
a year agoa year old
Method doesn't use the class instance and could be converted into a static method
 428class SettingsView(APIView):
 429    permission_classes = [IsAuthenticated]
 430
 431    def get(self, request, format=None): 432        """
 433        Get the current settings for the organization.
 434        """
Method doesn't use the class instance and could be converted into a static method
47class InviteView(APIView):
48    permission_classes = [IsAuthenticated]
49
50    def post(self, request, *args, **kwargs):51        email = request.data.get("email", None)
52        user = request.user
53        organization = parse_organization(request)
Method doesn't use the class instance and could be converted into a static method
289    },
290)
291class DemoRegisterView(LoginViewMixin, APIView):
292    def post(self, request, format=None):293        start = time.time()
294        serializer = DemoRegistrationSerializer(
295            data=request.data,
Method doesn't use the class instance and could be converted into a static method
187    },
188)
189class RegisterView(LoginViewMixin, APIView):
190    def post(self, request, format=None):191        register_data = request.data.get("register")
192        invite_token = register_data.get("invite_token", None)
193        serializer = RegistrationSerializer(
Method doesn't use the class instance and could be converted into a static method
163class SessionView(APIView):
164    permission_classes = [IsAuthenticated]
165
166    def get(self, request, *args, **kwargs):167        return JsonResponse({"isAuthenticated": True})
168
169