From 021a99f3f50eca77abb85e2f25f26af65ad06128 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:45:27 +1000 Subject: fix: Remove missing type parameter (#1570) Co-authored-by: KotlinIsland Co-authored-by: Ned Batchelder --- coverage/types.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'coverage/types.py') diff --git a/coverage/types.py b/coverage/types.py index e01f451e..828ab20b 100644 --- a/coverage/types.py +++ b/coverage/types.py @@ -29,7 +29,11 @@ else: ## File paths # For arguments that are file paths: -FilePath = Union[str, os.PathLike] +if TYPE_CHECKING: + FilePath = Union[str, os.PathLike[str]] +else: + # PathLike < python3.9 doesn't support subscription + FilePath = Union[str, os.PathLike] # For testing FilePath arguments FilePathClasses = [str, pathlib.Path] FilePathType = Union[Type[str], Type[pathlib.Path]] -- cgit v1.2.1