Skip to content

Commit 42bee76

Browse files
committed
Fix Python 3.8 regression
1 parent 5fda810 commit 42bee76

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/util.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
from typing import (
1111
Iterable, # Replaced by `collections.abc.Iterable` in 3.9.
12-
Tuple, # Replaced by `collections.abc.Tuple` in 3.9.
12+
List, # Replaced by `set` in 3.9.
13+
Set, # Replaced by `set` in 3.9.
14+
Tuple, # Replaced by `tuple` in 3.9.
1315
cast)
1416

1517
from pathspec import (
@@ -31,7 +33,7 @@ def debug_results(spec: PathSpec, results: Iterable[CheckResult[str]]) -> str:
3133
3234
Returns the message (:class:`str`).
3335
"""
34-
patterns = cast(list[RegexPattern], spec.patterns)
36+
patterns = cast(List[RegexPattern], spec.patterns)
3537

3638
pattern_table = []
3739
for index, pattern in enumerate(patterns, 1):
@@ -70,7 +72,7 @@ def debug_results(spec: PathSpec, results: Iterable[CheckResult[str]]) -> str:
7072
])
7173

7274

73-
def get_includes(results: Iterable[CheckResult[TStrPath]]) -> set[TStrPath]:
75+
def get_includes(results: Iterable[CheckResult[TStrPath]]) -> Set[TStrPath]:
7476
"""
7577
Get the included files from the check results.
7678

0 commit comments

Comments
 (0)