mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-05-05 06:49:18 -05:00
More miscellaneous cleanup
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import argparse
|
||||
import logging
|
||||
import os.path
|
||||
from typing import Optional
|
||||
from typing import Tuple
|
||||
|
||||
from aspy.yaml import ordered_dump
|
||||
@@ -18,9 +19,9 @@ from pre_commit.xargs import xargs
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _repo_ref(tmpdir: str, repo: str, ref: str) -> Tuple[str, str]:
|
||||
def _repo_ref(tmpdir: str, repo: str, ref: Optional[str]) -> Tuple[str, str]:
|
||||
# if `ref` is explicitly passed, use it
|
||||
if ref:
|
||||
if ref is not None:
|
||||
return repo, ref
|
||||
|
||||
ref = git.head_rev(repo)
|
||||
|
||||
Reference in New Issue
Block a user