From 460dd98dae56d26f0611a0f6dc9c24e44435958f Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 12 Jan 2023 10:44:15 -0500 Subject: mypy: pytracer.py, the last file in coverage/ --- coverage/types.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'coverage/types.py') diff --git a/coverage/types.py b/coverage/types.py index a45b831e..736269e0 100644 --- a/coverage/types.py +++ b/coverage/types.py @@ -32,8 +32,8 @@ class TTraceFn(Protocol): frame: FrameType, event: str, arg: Any, - lineno: Optional[int] = None # Our own twist, see collector.py - ) -> TTraceFn: + lineno: Optional[TLineNo] = None # Our own twist, see collector.py + ) -> Optional[TTraceFn]: ... ## Coverage.py tracing @@ -63,11 +63,9 @@ class TFileDisposition(Protocol): # - If measuring arcs in the C tracer, the values are sets of packed arcs (two # line numbers combined into one integer). -TTraceData = Union[ - Dict[str, Set[TLineNo]], - Dict[str, Set[TArc]], - Dict[str, Set[int]], -] +TTraceFileData = Union[Set[TLineNo], Set[TArc], Set[int]] + +TTraceData = Dict[str, TTraceFileData] class TTracer(Protocol): """Either CTracer or PyTracer.""" -- cgit v1.2.1