Closed gtato closed 4 years ago
hey @gtato.
In general, it should be fine to use decorators on methods of your interface-implementing classes, as long as those decorators preserve the signatures of the methods they wrap. We test this behavior here for example.
Are you sure the decorator you're using preserves the signature of your methods? Generally, the easiest way to do that is to ensure that the function returned by your decorator is constructed using functools.wraps
Hey @ssanderson, Thank you for the quick reply. Indeed I used wraps and it is working now. Probably the signature was not explicitly preserved and wraps solved that :).
Hi, Thank you for this great library. My question is already in the title. I want to implement the methods in the interface but for some unrelated reasons I am using some decorators which can vary depending on the class which implements the interface. These decorators won't really change the signature, but the current implementation complains if i use them. Any suggestion?