register events using the event id: remove some warnings in PyCharm