

def __init__(self, collection, parent=None):
    self.ui = load_ui('widget.ui', parent, directory=os.path.dirname(__file__))
    self.ui.expression = ColorizedCompletionTextEdit()
    self.ui.verticalLayout_3.addWidget(self.ui.expression)
    self.ui.expression.setAlignment(Qt.AlignCenter)
    self.ui.expression.setObjectName('expression')
    self.ui.expression.setToolTip('Define a new component. You can either type out the full name of a component\nwith the data:component syntax, or start typing and press TAB to use tab-completion.\n Blue-colored components are valid, while Red-colored components are invalid.')
    self._labels = {
        
    }
    self._data = {
        
    }
    self._collection = collection
    self._gather_components()
    self._gather_data()
    parent._init_widgets()
    self._connect()
    self.ui.expression.set_word_list(list(self._labels.keys()))

dataset/ETHPy150Open glue-viz/glue/glue/dialogs/custom_component/qt/widget.py CustomComponentWidget.__init__/VarMisuse@134/251 `self`->`parent`