Skip to content

Commit 3951f6f

Browse files
committed
type alias annotation for qt objects
1 parent 58c1545 commit 3951f6f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pytestqt/qtbot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Any,
1414
Self,
1515
Type,
16+
TypeAlias,
1617
cast,
1718
)
1819
from pathlib import Path
@@ -33,10 +34,10 @@
3334

3435
# Type hint objects until figuring out how to import across qt
3536
# versions possibly using 'qtpy' library.
36-
QWidget = Any
37-
SignalInstance = Any
38-
QRect = Any
39-
QKeySequence = Any
37+
QWidget: TypeAlias = Any
38+
SignalInstance: TypeAlias = Any
39+
QRect: TypeAlias = Any
40+
QKeySequence: TypeAlias = Any
4041

4142
if TYPE_CHECKING:
4243
# Keep local import behavior the same.

0 commit comments

Comments
 (0)