Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Remove circular import caused by typing annotations. #1882

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/apps/ocioview/ocioview/widgets/list_widget.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

from typing import Callable, Optional, Union
from typing import Callable, Optional, TYPE_CHECKING, Union

from PySide2 import QtCore, QtGui, QtWidgets

from ..items.config_item_model import BaseConfigItemModel
from ..utils import SignalsBlocked, next_name
from .item_view import BaseItemView

if TYPE_CHECKING:
from ..items.config_item_model import BaseConfigItemModel

class StringListWidget(BaseItemView):
"""
Expand Down Expand Up @@ -221,7 +222,7 @@ class ItemModelListWidget(BaseItemView):

def __init__(
self,
model: BaseConfigItemModel,
model: "BaseConfigItemModel",
model_column: int,
item_flags: QtCore.Qt.ItemFlags = BaseItemView.DEFAULT_ITEM_FLAGS,
item_icon: Optional[QtGui.QIcon] = None,
Expand Down