Skip to content

Commit 9044530

Browse files
fix type reference in addon skeleton
We cannot use this import directly, since it is only imported over type checking and might not exists in v2 (no qt installed) this would not only prevent the addon, but the whole application from starting.
1 parent 26f516f commit 9044530

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/programs/addon_skeleton.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Callable, TYPE_CHECKING
1+
from typing import TYPE_CHECKING, Any, Callable
22

33
if TYPE_CHECKING:
44
from PyQt5.QtWidgets import QVBoxLayout
@@ -22,8 +22,8 @@
2222

2323
# Use the LoggerHandler class for your logger
2424
from src.logger_handler import LoggerHandler
25-
2625
from src.models import Cocktail
26+
2727
# The addon interface will provide intellisense for all possible methods
2828
from src.programs.addons import AddonInterface
2929

@@ -57,7 +57,7 @@ def cocktail_trigger(self, prepare: Callable[[Cocktail], tuple[bool, str]]):
5757
In addition, there is a message, which can contain further information.
5858
"""
5959

60-
def build_gui(self, container: QVBoxLayout, button_generator: Callable[[str, Callable[[], None]], None]) -> bool:
60+
def build_gui(self, container: "QVBoxLayout", button_generator: Callable[[str, Callable[[], None]], None]) -> bool:
6161
"""Build up the GUI to do additional things on command.
6262
6363
Returns

0 commit comments

Comments
 (0)