Skip to content

Commit 5d9236b

Browse files
herobank110The-Compiler
authored andcommitted
change qtpy to Any alias
1 parent c2ac9ad commit 5d9236b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pytestqt/qtbot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import contextlib
22
import weakref
33
import warnings
4-
from typing import TYPE_CHECKING, Callable, Optional
4+
from typing import TYPE_CHECKING, Callable, Optional, Any
55

66
from pytestqt.exceptions import TimeoutError, ScreenshotError
77
from pytestqt.qt_compat import qt_api
@@ -15,9 +15,11 @@
1515
)
1616

1717
if TYPE_CHECKING:
18-
from qtpy.QtWidgets import QWidget
18+
# Type hint objects until figuring out how to import across qt
19+
# versions possibly using 'qtpy' library.
20+
QWidget = Any
1921

20-
BeforeCloseFunc = Callable[["QWidget"], None]
22+
BeforeCloseFunc = Callable[[QWidget], None]
2123

2224

2325
def _parse_ini_boolean(value):

0 commit comments

Comments
 (0)