@staticmethod
PYL-R0201336 def is_active(self):
337 return True
338
339 def is_anonymous(self):340 return False
341
342 def get_id(self):
333 def is_authenticated(self):
334 return True
335
336 def is_active(self):337 return True
338
339 def is_anonymous(self):
330 return False
331
332 # Flask-Login integration
333 def is_authenticated(self):334 return True
335
336 def is_active(self):
8class Query(graphene.ObjectType):
9 settings = graphene.Field(Settings)
10
11 def resolve_settings(self, info):12 return Setting.query.first()
13
14
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
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.