I guess it really doesn't matter. It will actually act as a staticmethod (regular function), anyway. Meaning, it will not have access to the class or the instance (if you make an instance of one). Now, if you use on_tick_listener_manager.register_listener on a method of the class/instance, it will have access to the specific object. Just test out this example:
Syntax: Select all
from listeners import OnTick
from listeners import on_tick_listener_manager
class Test(object):
@classmethod
def test_one(cls, *args):
print('test_one', cls, args)
@OnTick
def test_two(*args):
print('test_two', args)
def test_three(self, *args):
print('test_three', self, args)
var = Test()
on_tick_listener_manager.register_listener(Test.test_one)
on_tick_listener_manager.register_listener(var.test_three)
def unload():
on_tick_listener_manager.unregister_listener(Test.test_one)
on_tick_listener_manager.unregister_listener(var.test_three)