Refactor
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
8b810c4000
commit
91554384f2
1 changed files with 205 additions and 165 deletions
|
|
@ -2,7 +2,7 @@ import threading
|
|||
from collections import defaultdict
|
||||
from datetime import datetime
|
||||
from types import TracebackType
|
||||
from typing import Any, DefaultDict, Dict, List, Optional, Type
|
||||
from typing import Any, DefaultDict, Dict, List, Literal, Optional, Type
|
||||
|
||||
from ..context import get_context
|
||||
from ..views import Model, Trace
|
||||
|
|
@ -53,7 +53,7 @@ class TracingContext:
|
|||
type: Optional[Type[BaseException]],
|
||||
exception: Optional[BaseException],
|
||||
traceback: Optional[TracebackType],
|
||||
) -> bool:
|
||||
) -> Literal[False]:
|
||||
assert self._contexts[threading.get_ident()][-1] == self
|
||||
self._contexts[threading.get_ident()].remove(self)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue