fossasia / open-event-server

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
5 months ago4 years old
Method doesn't use the class instance and could be converted into a static method
336    def is_active(self):
337        return True
338
339    def is_anonymous(self):340        return False
341
342    def get_id(self):
Method doesn't use the class instance and could be converted into a static method
333    def is_authenticated(self):
334        return True
335
336    def is_active(self):337        return True
338
339    def is_anonymous(self):
Method doesn't use the class instance and could be converted into a static method
330            return False
331
332    # Flask-Login integration
333    def is_authenticated(self):334        return True
335
336    def is_active(self):
Method doesn't use the class instance and could be converted into a static method
 8class Query(graphene.ObjectType):
 9    settings = graphene.Field(Settings)
10
11    def resolve_settings(self, info):12        return Setting.query.first()
13
14
Method doesn't use the class instance and could be converted into a static method
60    video_stream_moderators detail by id
61    """
62
63    def after_get_object(self, obj, kwargs):64        if not has_access('is_coorganizer', event_id=obj.video_stream.event_id):
65            raise ForbiddenError({'pointer': 'user_id'}, 'Co-Organizer access required')
66