From 361ff4da262b4891323287049e9e6c5fbe1d01dc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Apr 2022 20:42:11 +0200 Subject: Adding upstream version 2.18.1. Signed-off-by: Daniel Baumann --- pre_commit/commands/try_repo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pre_commit/commands/try_repo.py') 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 -- cgit v1.2.3