flake8-django icon indicating copy to clipboard operation
flake8-django copied to clipboard

DJ13 is not possible when combined with staticmethod decorator

Open mounirmesselmeni opened this issue 2 years ago • 0 comments

Hello,

The new DJ13 @receiver decorator must be on top of all the other decorators is not possible to fix if it's combined with '@staticmethid'

E.g

class MyModel(models.Model)
    @staticmethod
    @receiver(pre_save, sender='auth.User')
    def pre_save_handler(sender, instance, *args, **kwargs):
        pass

Would there be a way to add an exception when it's used with staticmethod decorator?

mounirmesselmeni avatar Aug 18 '22 08:08 mounirmesselmeni