crab icon indicating copy to clipboard operation
crab copied to clipboard

[Feature Request] Modify decorator implementation

Open dandansamax opened this issue 5 months ago • 0 comments

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

dandansamax avatar Aug 29 '24 13:08 dandansamax