diff options
author | KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> | 2023-03-15 20:45:27 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 03:45:27 -0700 |
commit | 021a99f3f50eca77abb85e2f25f26af65ad06128 (patch) | |
tree | d1e776b853df1ac7b793f8c12719255b1aa531a5 /coverage | |
parent | 4574ecf128ae51c2b950f6c9cb2486b86f5354e7 (diff) | |
download | python-coveragepy-git-021a99f3f50eca77abb85e2f25f26af65ad06128.tar.gz |
fix: Remove missing type parameter (#1570)
Co-authored-by: KotlinIsland <kotlinisland@users.noreply.github.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/types.py | 6 |
1 files changed, 5 insertions, 1 deletions
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]] |