ynput / ayon-ftrack

Apache License 2.0
3 stars 9 forks source link

Service tools: Fake 'ftrack_common.event_handlers' #154

Closed iLLiCiTiT closed 2 days ago

iLLiCiTiT commented 2 days ago

Changelog Description

Fake submodule so class imported from it is considered as the same classes.

Additional review information

This is for cases when any base handle class is not imported from ftrack_common but from ftrack_common.event_handlers. In that case (if module is not in sys.modules yet), it will reimport the files again, which will cause different ids of classes. Preparing it for python will avoid importing it again.

Testing notes:

  1. When using service tools, it is possible to dicover action that imports base class from ftrack_common.event_handlers.