summaryrefslogtreecommitdiffstats
path: root/pre_commit/prefix.py
diff options
context:
space:
mode:
Diffstat (limited to 'pre_commit/prefix.py')
-rw-r--r--pre_commit/prefix.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pre_commit/prefix.py b/pre_commit/prefix.py
index 0e3ebbd..f1b28c1 100644
--- a/pre_commit/prefix.py
+++ b/pre_commit/prefix.py
@@ -1,6 +1,7 @@
+from __future__ import annotations
+
import os.path
from typing import NamedTuple
-from typing import Tuple
class Prefix(NamedTuple):
@@ -12,6 +13,6 @@ class Prefix(NamedTuple):
def exists(self, *parts: str) -> bool:
return os.path.exists(self.path(*parts))
- def star(self, end: str) -> Tuple[str, ...]:
+ def star(self, end: str) -> tuple[str, ...]:
paths = os.listdir(self.prefix_dir)
return tuple(path for path in paths if path.endswith(end))