Skip to content
Snippets Groups Projects

Improve typing

Merged Oscar Gustafsson requested to merge typing4 into master
4 files
+ 21
7
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
2
@@ -19,6 +19,8 @@ from b_asic.operation import Operation
@@ -19,6 +19,8 @@ from b_asic.operation import Operation
from b_asic.port import InputPort
from b_asic.port import InputPort
if TYPE_CHECKING:
if TYPE_CHECKING:
 
from qtpy.QtWidgets import QGraphicsTextItem
 
from b_asic.GUI.main_window import SFGMainWindow
from b_asic.GUI.main_window import SFGMainWindow
@@ -90,13 +92,13 @@ class DragButton(QPushButton):
@@ -90,13 +92,13 @@ class DragButton(QPushButton):
"""Return the type name of the underlying operation."""
"""Return the type name of the underlying operation."""
return self.operation.type_name()
return self.operation.type_name()
def add_label(self, label: str) -> None:
def add_label(self, label: "QGraphicsTextItem") -> None:
"""
"""
Add label to button.
Add label to button.
Parameters
Parameters
----------
----------
label : src
label : QGraphicsTextItem
The label to add.
The label to add.
"""
"""
self.label = label
self.label = label
Loading