Skip to content

Commit 2222e70

Browse files
only import QVBoxLayout in type checking mode
This is to not break on v2 app, where qt is probably no longer installed/needed
1 parent 6e418e8 commit 2222e70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/programs/addon_skeleton.py

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

3-
from PyQt5.QtWidgets import QVBoxLayout
3+
if TYPE_CHECKING:
4+
from PyQt5.QtWidgets import QVBoxLayout
45

56
# Auto created by CocktailBerry CLI version VERSION_HOLDER
67
# Imports are automatically generated for all the examples from the docs

0 commit comments

Comments
 (0)