diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-04 18:42:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-04 18:42:11 +0000 |
commit | 361ff4da262b4891323287049e9e6c5fbe1d01dc (patch) | |
tree | 969b376a2c170841758d39ef9516dac65c8b94cd /pre_commit/commands/try_repo.py | |
parent | Adding upstream version 2.17.0. (diff) | |
download | pre-commit-361ff4da262b4891323287049e9e6c5fbe1d01dc.tar.xz pre-commit-361ff4da262b4891323287049e9e6c5fbe1d01dc.zip |
Adding upstream version 2.18.1.upstream/2.18.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/try_repo.py')
-rw-r--r-- | pre_commit/commands/try_repo.py | 6 |
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 |