summaryrefslogtreecommitdiffstats
path: root/pre_commit/commands/try_repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'pre_commit/commands/try_repo.py')
-rw-r--r--pre_commit/commands/try_repo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pre_commit/commands/try_repo.py b/pre_commit/commands/try_repo.py
index 4aee209..ef099f5 100644
--- a/pre_commit/commands/try_repo.py
+++ b/pre_commit/commands/try_repo.py
@@ -1,8 +1,8 @@
+from __future__ import annotations
+
import argparse
import logging
import os.path
-from typing import Optional
-from typing import Tuple
import pre_commit.constants as C
from pre_commit import git
@@ -18,7 +18,7 @@ from pre_commit.xargs import xargs
logger = logging.getLogger(__name__)
-def _repo_ref(tmpdir: str, repo: str, ref: Optional[str]) -> Tuple[str, str]:
+def _repo_ref(tmpdir: str, repo: str, ref: str | None) -> tuple[str, str]:
# if `ref` is explicitly passed, use it
if ref is not None:
return repo, ref