crab
crab copied to clipboard
[Feature Request] Modify decorator implementation
Required prerequisites
- [X] I have searched the Issue Tracker that this hasn't already been reported. (+1 or comment there if it has.)
Motivation
Current decorator implementation will change all functions to Action
instances during module loading. This implementation is waste of time and counter normal python rules (The decorators shouldn't modify function behavior), which will confuse new contributors.
Solution
- Change the decorator behavior to register rather than directly change the original function behavior
- Mark old action decorator as deprecated
- Use an object-oriented way to manage actions
Additional context
No response