Skip to content

Commit

Permalink
feat(typing): add T_WidgetParent and T_ObjectParent
Browse files Browse the repository at this point in the history
  • Loading branch information
rainzee committed Nov 17, 2024
1 parent 4077f44 commit 46dd2c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions siui/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@
- [`PEP 526`](https://www.python.org/dev/peps/pep-0526/)
"""

from typing import Optional

from PyQt5.QtCore import QObject
from PyQt5.QtWidgets import QWidget
from typing_extensions import TypeAlias

T_WidgetParent: TypeAlias = Optional[QWidget]
"""Type of widget parent"""

T_ObjectParent: TypeAlias = Optional[QObject]
"""Type of object parent"""

0 comments on commit 46dd2c1

Please sign in to comment.