File .deepsource.toml
not found in the default branch of the repository root. Please refer to the docs.
@staticmethod
PYL-R0201 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 """
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)
289 },
290)
291class DemoRegisterView(LoginViewMixin, APIView):
292 def post(self, request, format=None):293 start = time.time()
294 serializer = DemoRegistrationSerializer(
295 data=request.data,
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(
163class SessionView(APIView):
164 permission_classes = [IsAuthenticated]
165
166 def get(self, request, *args, **kwargs):167 return JsonResponse({"isAuthenticated": True})
168
169
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.