Skip to content

Commit 021a99f

Browse files
KotlinIslandnedbat
andauthoredMar 15, 2023
fix: Remove missing type parameter (#1570)
Co-authored-by: KotlinIsland <[email protected]> Co-authored-by: Ned Batchelder <[email protected]>
1 parent 4574ecf commit 021a99f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎coverage/types.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ class Protocol: # pylint: disable=missing-class-docstring
2929
## File paths
3030

3131
# For arguments that are file paths:
32-
FilePath = Union[str, os.PathLike]
32+
if TYPE_CHECKING:
33+
FilePath = Union[str, os.PathLike[str]]
34+
else:
35+
# PathLike < python3.9 doesn't support subscription
36+
FilePath = Union[str, os.PathLike]
3337
# For testing FilePath arguments
3438
FilePathClasses = [str, pathlib.Path]
3539
FilePathType = Union[Type[str], Type[pathlib.Path]]

0 commit comments

Comments
 (0)
Please sign in to comment.