fossasia / open-event-server

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
29 occurrences in this check
Method could be a function
15
16
17class VideoStreamModeratorList(ResourceList):
18    def before_post(self, args, kwargs, data):19        require_relationship(['video_stream'], data)
20        stream = safe_query_kwargs(VideoStream, data, 'video_stream')
21        if not has_access('is_coorganizer', event_id=stream.event_id):
Method could be a function
 40    Create users groups roles
 41    """
 42
 43    def before_post(self, args, kwargs, data): 44        """
 45        before get method to get the resource id for fetching details
 46        :param args:
Method could be a function
 58    Create new alternate email for a user
 59    """
 60
 61    def before_post(self, args, kwargs, data): 62        """
 63        before post method to check for required relationship and proper permission
 64        :param args:
Method could be a function
 17    List and create Tracks
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        """
 22        before post method to check for required relationship and proper permission
 23        :param args:
Method could be a function
 51    Create and List Tickets
 52    """
 53
 54    def before_post(self, args, kwargs, data): 55        """
 56        before post method to check for required relationship and proper permission
 57        :param args:
Method could be a function
 16    List and create TicketTag
 17    """
 18
 19    def before_post(self, args, kwargs, data): 20        """
 21        before post method for checking required relationship
 22        :param args:
Method could be a function
 19    only POST and GET method allowed
 20    """
 21
 22    def before_post(self, args, kwargs, data): 23        """
 24        before post method to check for required relationship and proper permission
 25        :param args:
Method could be a function
 22    List and Create Stripe Authorization
 23    """
 24
 25    def before_post(self, args, kwargs, data): 26        """
 27        before post method to check for required relationship and proper permission
 28        :param args:
Method could be a function
17    List and create Sponsors
18    """
19
20    def before_post(self, args, kwargs, data):21        """
22        before post method to check for required relationship and proper permission
23        :param args:
Method could be a function
 17    create Speakers Call
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        """
 22        before post method to check for required relationship and proper permission
 23        :param args:
Method could be a function
 75    speakers call detail by id
 76    """
 77
 78    def before_patch(self, args, kwargs, data): 79        """
 80        before patch method to check for existing speakers-call
 81        :param args:
Method could be a function
197            'speaker', self.resource.schema, speaker, data, excluded
198        )
199
200    def after_patch(self, result):201        """
202        method to create session speaker link
203        :param result:
Method could be a function
13    List and Create Social Links for an event
14    """
15
16    def before_post(self, args, kwargs, data):17        """
18        before post method to check for required relationship and proper permission
19        :param args:
Method could be a function
 17    List and create sessions
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        """
 22        before post method to check for required relationship and proper permission
 23        :param args:
Method could be a function
 25    Create role invites
 26    """
 27
 28    def before_post(self, args, kwargs, data): 29        """
 30        before get method to get the resource id for fetching details
 31        :param args:
Method could be a function
485    Order relationship
486    """
487
488    def before_get(self, args, kwargs):489        """
490        before get method to get the resource id for fetching details
491        :param view_kwargs:
Method could be a function
152    OrderListPost class for OrderSchema
153    """
154
155    def before_post(self, args, kwargs, data=None):156        """
157        before post method to check for required relationships and permissions
158        :param args:
Method could be a function
 17    List and create microlocations
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        """
 22        before post method to check for required relationship and proper permission
 23        :param args:
Method could be a function
 22    Create and List Feedbacks
 23    """
 24
 25    def before_post(self, args, kwargs, data): 26        """
 27        method to check for required relationship with event
 28        :param args:
Method could be a function
 17    Create and List FAQs
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        """
 22        method to check for required relationship with event
 23        :param args:
Method could be a function
 17    List and create faq-types
 18    """
 19
 20    def before_post(self, args, kwargs, data): 21        require_relationship(['event'], data)
 22
 23        if not has_access('is_coorganizer', event_id=data['event']):
Method could be a function
 13
 14
 15class ExhibitorListPost(ResourceList):
 16    def before_post(self, args, kwargs, data): 17        require_relationship(['event'], data)
 18        if not has_access('is_coorganizer', event_id=data['event']):
 19            raise ForbiddenError(
Method could be a function
357
358        return query_
359
360    def before_post(self, args, kwargs, data=None):361        """
362        before post method to verify if the event location is provided before publishing the event
363        and checks that the user is verified
Method could be a function
505            if not is_logged_in() or not has_access('is_coorganizer', event_id=event.id):
506                raise ObjectNotFound({'parameter': '{id}'}, "Event: not found")
507
508    def before_patch(self, args, kwargs, data=None):509        """
510        before patch method to verify if the event location is provided before publishing the event and checks that
511        the user is verified
Method could be a function
 18    Only POST method allowed
 19    """
 20
 21    def before_post(self, args, kwargs, data): 22        """
 23        before post method to check for required relationship and proper permission
 24        :param args: