From e3f865072452ece7364dd654e0d042a413378f10 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Tue, 14 Nov 2023 17:09:42 +0000 Subject: [PATCH] Removed overloaded methods --- brainglobe_utils/qtpy/collapsible_widget.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/brainglobe_utils/qtpy/collapsible_widget.py b/brainglobe_utils/qtpy/collapsible_widget.py index a6a5054..feeab84 100644 --- a/brainglobe_utils/qtpy/collapsible_widget.py +++ b/brainglobe_utils/qtpy/collapsible_widget.py @@ -1,4 +1,4 @@ -from typing import List, Optional, Union, overload +from typing import List, Optional, Union from qtpy.QtCore import Qt, Signal from qtpy.QtWidgets import QGroupBox, QVBoxLayout, QWidget @@ -86,14 +86,6 @@ def __init__(self): self.layout().setContentsMargins(0, 0, 0, 0) self.collapsible_widgets: List[CollapsibleWidget] = [] - @overload - def add_widget(self, widget: QWidget): - ... - - @overload - def add_widget(self, widget: CollapsibleWidget): - ... - def add_widget(self, widget: Union[QWidget, CollapsibleWidget]): """ Adds a QWidget or a CollapsibleWidget to the chest. @@ -109,14 +101,6 @@ def add_widget(self, widget: Union[QWidget, CollapsibleWidget]): self.layout().addWidget(widget, 0, Qt.AlignTop) - @overload - def remove_widget(self, widget: QWidget): - ... - - @overload - def remove_widget(self, widget: CollapsibleWidget): - ... - def remove_widget(self, widget: Union[QWidget, CollapsibleWidget]): """ Removes a widget from the chest.