From 21d66355a392d3d3dec8f79770e4be7673edf1dd Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 29 Dec 2022 16:53:54 -0500 Subject: mypy: check python.py --- coverage/types.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'coverage/types.py') diff --git a/coverage/types.py b/coverage/types.py index 015c3747..d138b2f2 100644 --- a/coverage/types.py +++ b/coverage/types.py @@ -5,7 +5,8 @@ Types for use throughout coverage.py. """ -from typing import Dict, List, Optional, Tuple, Union, TYPE_CHECKING +from types import ModuleType +from typing import Dict, Iterable, List, Optional, Tuple, Union, TYPE_CHECKING if TYPE_CHECKING: # Protocol is new in 3.8. PYVERSIONS @@ -53,6 +54,10 @@ TLineNo = int TArc = Tuple[TLineNo, TLineNo] +TMorf = Union[ModuleType, str] + +TSourceTokenLines = Iterable[List[Tuple[str, str]]] + ## Debugging class TWarnFn(Protocol): -- cgit v1.2.1