This PR removes an ocioview circular import issue caused by typing annotations and preventing to import modules within the package:
Python 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ocioview.inspect.hello
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/inspect/__init__.py", line 4, in <module>
from .code_inspector import CodeInspector
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/inspect/code_inspector.py", line 13, in <module>
from ..widgets import EnumComboBox, LogView
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/widgets/__init__.py", line 15, in <module>
from .list_widget import StringListWidget, ItemModelListWidget
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/widgets/list_widget.py", line 8, in <module>
from ..items.config_item_model import BaseConfigItemModel
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/items/__init__.py", line 4, in <module>
from .color_space_edit import ColorSpaceEdit
File "/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/items/color_space_edit.py", line 12, in <module>
from ..widgets import (
ImportError: cannot import name 'StringListWidget' from partially initialized module 'ocioview.widgets' (most likely due to a circular import) (/Users/kelsolaar/Documents/Development/opencolorio/OpenColorIO/src/apps/ocioview/ocioview/widgets/__init__.py)
This PR removes an
ocioview
circular import issue caused by typing annotations and preventing to import modules within the package: