|
1 | | -from . import con, connection |
| 1 | +from . import con |
2 | 2 | from .replies import BarConfigReply, InputReply |
3 | 3 | from enum import Enum |
4 | | -from typing import Any, Optional |
| 4 | +from typing import Any, Optional, TYPE_CHECKING |
| 5 | + |
| 6 | +if TYPE_CHECKING: |
| 7 | + from .connection import Connection |
5 | 8 |
|
6 | 9 |
|
7 | 10 | class IpcBaseEvent: |
@@ -66,7 +69,7 @@ class WorkspaceEvent(IpcBaseEvent): |
66 | 69 | :ivar ipc_data: The raw data from the i3 ipc. |
67 | 70 | :vartype ipc_data: dict |
68 | 71 | """ |
69 | | - def __init__(self, data: dict[str, Any], conn: connection.Connection, _Con=con.Con): |
| 72 | + def __init__(self, data: dict[str, Any], conn: 'Connection', _Con=con.Con): |
70 | 73 | self.ipc_data = data |
71 | 74 | self.change: str = data['change'] |
72 | 75 | self.current: Optional[con.Con] = None |
@@ -127,7 +130,7 @@ class WindowEvent(IpcBaseEvent): |
127 | 130 | :ivar ipc_data: The raw data from the i3 ipc. |
128 | 131 | :vartype ipc_data: dict |
129 | 132 | """ |
130 | | - def __init__(self, data: dict[str, Any], conn: connection.Connection, _Con=con.Con): |
| 133 | + def __init__(self, data: dict[str, Any], conn: 'Connection', _Con=con.Con): |
131 | 134 | self.ipc_data = data |
132 | 135 | self.change: str = data['change'] |
133 | 136 | self.container = _Con(data['container'], None, conn) |
|
0 commit comments