DevClad-Inc / devclad

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
114        return response
115
116    # TODO Rename this here and in `post`
117    def refresh_op(self, response, cookie_name):118        cookie_secure = getattr(settings, "JWT_AUTH_SECURE", False)
119        cookie_httponly = getattr(settings, "JWT_AUTH_HTTPONLY", True)
120        cookie_samesite = getattr(settings, "JWT_AUTH_SAMESITE", "Lax")
Method doesn't use the class instance and could be converted into a static method
224        model = Profile
225        exclude = ["user", "uid"]
226
227    def get_avatar(self, obj):228        profile = Profile.objects.get(user=obj.user)
229        return profile.get_avatar_url()
230
Method doesn't use the class instance and could be converted into a static method
209        model = Profile
210        exclude = ["user", "uid"]
211
212    def get_avatar(self, obj):213        profile = Profile.objects.get(user=obj.user)
214        return profile.get_avatar_url()
215