|
1 | | -from __future__ import annotations |
2 | | - |
3 | | -import asyncio |
4 | 1 | import itertools |
5 | 2 | import os |
6 | 3 | import pathlib |
@@ -157,7 +154,7 @@ def __init__(self, thread_id: Any) -> None: |
157 | 154 | class StackFrameEntry: |
158 | 155 | def __init__( |
159 | 156 | self, |
160 | | - parent: Optional[StackFrameEntry], |
| 157 | + parent: Optional["StackFrameEntry"], |
161 | 158 | context: Any, |
162 | 159 | name: str, |
163 | 160 | type: str, |
@@ -193,7 +190,7 @@ def __init__( |
193 | 190 | def __repr__(self) -> str: |
194 | 191 | return f"StackFrameEntry({self.name!r}, {self.type!r}, {self.source!r}, {self.line!r}, {self.column!r})" |
195 | 192 |
|
196 | | - def get_first_or_self(self) -> StackFrameEntry: |
| 193 | + def get_first_or_self(self) -> "StackFrameEntry": |
197 | 194 | if self.stack_frames: |
198 | 195 | return self.stack_frames[0] |
199 | 196 | return self |
@@ -260,14 +257,14 @@ def end_keyword(self, data: running.Keyword, result: result.Keyword) -> None: |
260 | 257 |
|
261 | 258 |
|
262 | 259 | class Debugger: |
263 | | - __instance: ClassVar[Optional[Debugger]] = None |
| 260 | + __instance: ClassVar[Optional["Debugger"]] = None |
264 | 261 | __lock: ClassVar = threading.RLock() |
265 | 262 | __inside_instance: ClassVar = False |
266 | 263 |
|
267 | 264 | _logger = LoggingDescriptor() |
268 | 265 |
|
269 | 266 | @classmethod |
270 | | - def instance(cls) -> Debugger: |
| 267 | + def instance(cls) -> "Debugger": |
271 | 268 | if cls.__instance is not None: |
272 | 269 | return cls.__instance |
273 | 270 | with cls.__lock: |
@@ -318,7 +315,6 @@ def __init__(self) -> None: |
318 | 315 | self.terminated = False |
319 | 316 | self.attached = False |
320 | 317 | self.path_mappings: List[PathMapping] = [] |
321 | | - self.server_loop: Optional[asyncio.AbstractEventLoop] = None |
322 | 318 |
|
323 | 319 | self._keyword_to_evaluate: Optional[Callable[..., Any]] = None |
324 | 320 | self._evaluated_keyword_result: Any = None |
@@ -917,14 +913,12 @@ def end_suite(self, name: str, attributes: Dict[str, Any]) -> None: |
917 | 913 | status = attributes.get("status", "") |
918 | 914 |
|
919 | 915 | if status == "FAIL": |
920 | | - if self.server_loop: |
921 | | - self.process_end_state( |
922 | | - status, |
923 | | - {"failed_suite"}, |
924 | | - "Suite failed.", |
925 | | - f"Suite failed{f': {v}' if (v := attributes.get('message')) else ''}", |
926 | | - ) |
927 | | - |
| 916 | + self.process_end_state( |
| 917 | + status, |
| 918 | + {"failed_suite"}, |
| 919 | + "Suite failed.", |
| 920 | + f"Suite failed{f': {v}' if (v := attributes.get('message')) else ''}", |
| 921 | + ) |
928 | 922 | self.wait_for_running() |
929 | 923 |
|
930 | 924 | source = attributes.get("source") |
|
0 commit comments